Dan Rosenstark
Dan Rosenstark

Reputation: 69787

Create Batch File From Eclipse Project

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.

Upvotes: 3

Views: 14846

Answers (1)

jwaddell
jwaddell

Reputation: 1934

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).

Upvotes: 3

Related Questions