Here’s a quick guide on how to setup your NetBeans IDE to create an executable JAR file output. If you’re using JCreator to create JAR file, click here.
- Once you already created your Project using NetBeans IDE, right click the project name and click Properties.
- A new window will appear, the Project Properties. On the left side, click Packaging.
- The right panel will change and check Compress JAR File and Build JAR after compiling.
- JAR file saving location is indicated at the text box labeled Jar File.
- Then, Click OK. Now, compile your project and go to the saving location and try to click the JAR to execute your application.
You can see the sample window in the screen shot below for your guidance. Thanks!
Click the image to enlarge.
Tags: Creating JAR file, executable jar file, jar file, Java JAR File, NetBeans IDE











Neat!! Thanks bud
thanks about information . i need this information because i don’t make jar file with netbeans IDE
@JC, @safi: You’re welcome! I hope that this small information helped you.
Thank you very much!!!!
I had created the related jar file in the above way, but while trying to run it with a double click, I m getting the following error message
“could not find the main class:
…\prjName\dist\jarFile.jar. Program will exit. ”
So what might have been gone wrong. I had opened the jar file, like openwith javaw from the bin folder where my java is installed.
Infact I can execute the same from command line with javaw -jar jarFile.jar, but I want to execute it on double click!!!!!!
I still dont find my jar file even after thoroughly following ur steps