How will the project idea packaged into jar file

How will the project idea packaged into jar file

Recently encountered a problem at work, they need to local java file labeled jar package, spread to run on the cloud server. So learn how labeled jar package in java project intellij idea will be.

* File->Porject Structure

 

 

* Select Artifects in Project Setings in. Click the + sign to select the option Empty jar file

 

 

* Modify the name of the jar file in the Name option.
* Then click on the button below Creat Manifest, click ok (should default is the current project)

 

 

* Click on the right side of the Main Class folder icon, select the current entry class project, that class where the main function, click ok

 

 

 

* Available Elements in the resource file, double-click after compiling a column on the right side, the left side into its jar package

 

 

* Build Artifacts click Build options

 

 

 

 

* Click the Build option.
* Build option here is the first build jar, Rebuild is rebuild jar modified, clean is to remove the jar.

 

 

 

* Here we can see the jar packets generated

 

 

 

* Into the jar package directory, enter cmd in the address bar and press Enter, enter the command line

 

 

 

 

 * Execute the command to run jar file in Figure

 

 

 

 

Guess you like

Origin www.cnblogs.com/lxy764139720/p/11478899.html
Recommended