How can I create a self-consistent .jar file with Eclipse?

Select you project, then Export => Java => Runnable JAR file

You can then choose to extract/package/copy required libraries into your JAR and also select the class, whose main() method should be executed on startup.

Then you can execute the generated jar via:
java -jar yourjar.jar

Leave a Comment