views:

111

answers:

1

How can I create a runtime package of some sort -- an all-in-one jar with the Main class specified, a Mac .app, or similar -- from an Eclipse Java project? I would like to get all the required jars and so forth without having to make the batch file myself.

+2  A: 

Right-click on your project in Eclipse, and select Export. Select Java->Runnable JAR File.

You can then select a particular Eclipse Launch Configuration on which to base the export (i.e. the main class and the classpath used to run it), whether to extract or package the required libraries, and whether to create an ANT script (so you could build the JAR file outside of Eclipse).

jwaddell
Thanks, that works for now. I'd like to find a tool to make a .app automatically for OSX, since doing it by hand -- and updating it by hand -- is a pain.
Yar