O'Reilly logo

Java Garage by Eben Hewitt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating JAR Files with Eclipse

This process is somewhat simpler using the Eclipse IDE. Any reasonable IDE should give you the ability to create a JAR for your application; we use Eclipse here because it is free and pretty reliable and we've been using it a lot in this book.

1.
With an open project, click File > Export….
2.
Select the JAR file and click Next.
3.
Click on the application in the Select the Resources to Export window, because you may not want to include everything. Choose the classes directory (and the source code if you want to distribute it).
4.
In the Select the Export Destination text field, choose where you want your JAR to end up, and give it a name.
5.
Click Next, and Next again.
6.
Click the Use Existing Manifest from Workspace ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required