Tuesday, February 10, 2015

Create executable jar on Eclipse

1. After the coding is complete, run the project as Java Application. This step is mandatory for Eclipse to create the Launch configuration info.

2. Identify the Launch configuration name by going to "Run Configurations..." (right click on project -> Run As). On the "Main" tab, there is a Name textbox on the top. The value is editable.

3. Export the project as "Runnable JAR file" (Right click on project -> Export). On the next step, select the Launch configuration for the name and set the Export destination.

4. After the jar is generated, run the application by java -jar <app_name.jar>

No comments:

Post a Comment