This tutorial will explain how to export your written projects as runnable jar archives.
Export your project as runnable jar file
- Make sure you know the name of the run configuration to use for your project.
- Right-click the main java class of your project, i.e. the class which contains the static main - method and is launched by your run configuration. In JavaView, these classes usually start with Pa…, i.e. PaMyProject.
- Hit "export" and select "Java" - "Runnable JAR file". Hit "next".
- Under "Launch Configuration" select the run configuration you used to use for starting your project. Under "Export destination" select a path and file name your jar file will be saved to. Under "Library handling" make sure that the option "Extract required libraries into ..." is selected. Hit "Finish".
- Most likely you can ignore any upcoming warnings.
- Ensure yourself that your program runs by double-clicking the generated jar file.
- In the case of warning / error messages which say that the license file, resource files, icons etc. cannot be found, make sure that the exported JAR file is in the same directory as the resource folder "rsrc" which can usually be found in (JavaView/srcBase/rsrc). For example copy this folder and place it in the same directory as the exported JAR file.