Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 349
Dan Rosenstark Avatar asked Mar 03 '26 01:03

Dan Rosenstark


1 Answers

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

like image 105
jwaddell Avatar answered Mar 05 '26 14:03

jwaddell