Domanda

I just finished making a simple java desktop application.

I want to know how do I combine this app into a single executable file, so that double clicking it will run the application. Right now, I run the application through the IDE, but that's not how I want it to run forever.

È stato utile?

Soluzione

I assume you have been using Eclipse IDE.

In your package explorer (usually on the left side), find your Java Project you wish to export, right click in it and choose Export from the menu.

When asked for type, expand the Java folder icon and choose Runnable JAR file.

Under Launch configuration, find and select your class that will run it (the one with main method).
Choose where you want to export it and what you want to do with the other, non-standard libraries you are using.

Click on Finish.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top