2

In a windows environment we have an eclipse project (written in Java) that contains multiple run configurations. The run configurations contain the complete set of needed libraries and resource directories.

While in eclipse it is easy to execute the classes in run and debug mode from the run configurations.

We use ANT to compile the project into a JAR file for production purposes.

Once we have the JAR file created, executing it requires typing the complete java.exe command (including all classpath info) into the command prompt.

We generally end up creating bat files to avoid having to type this every time.

The question is, is there a simple way to have eclipse or ANT generate these bat files directly from the run configurations?

Tom Hubbard
  • 15,820
  • 14
  • 59
  • 86

1 Answers1

0

You are aware of the "Export -> Runnable Jar" command, which allow you to create a jar which can be executed with "java -jar ...".

There are different versions depending on your needs. I've found that the "put all library jars in a separate folder" to work best for us.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347