I have built a Java application that has some dependencies (~10). I would like to easily package this application up and deploy it as a single file to a CD or USB drive.
There doesn't seem to be any "nice" wizard to search the project, grab the dependencies and setup the classpath on the target computer. I have to do this manually.
Is there a better way? Something simple, easy and straight-forward. A link to a tutorial on this would be great.
Seems to me that this should be a built-in feature to eclipse. Deployment of a web application seems easy enough, but not a Java application.
Select the Project in the Project Explorer. Choose File >> New >> Package menu option to create a new Java package. Alternatively, Right-click on the project choose New >> Package from the context menu. Give a package name and click on the Finish button.
The recommended way to package Java applications is to use a collection of Ant tasks ( ant-javafx. jar ), which are provided with the JRE. NetBeans IDE uses these Ant tasks to package JavaFX and Java SE projects. Embedded packaging support in NetBeans IDE covers most of the typical use cases.
In Eclipse, select your application's project(s) and invoke the File->Export... menu item. In the Export wizard selector, select Java - Jar file and press the Next button. Select the files that are to be deployed, set the export destination to <yourApplication>/<yourApplication>.
Step 1: Open Eclipse and click File > New > Java Project. Step 2: Provide the Project Name and click on the Finish button. Step 3: In the Package Explorer (left-hand side of the window) select the project which you have created. Step 4: Right-click on the src folder, select New > Class from the submenu.
Have a look at the Fat Jar Plug-In.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With