سؤال

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.

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top