How to Generate JAR File in Netbeans

Open up NetBeans., Open Project Properties., Mark the Checkbox Compress JAR File., Confirm the Change., Build your Project., Locate your JAR file., Know How to Run It.

7 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Open up NetBeans.

    Right click on the name of the project you want to generate a JAR file from, and select Properties from a drop down menu. , On your Properties window, look at the list of Categories on the left side.

    Go over to Build and under it should be Packaging, click on it.

    You should see Compress JAR File checkbox on the right, mark it. , Press the OK button at the bottom right. , There are several ways to it, but the easiest one is to press a button with an icon of a hammer next to the drop down menu for running configuration. , Most common one is in My Documents/NetBeansProjects, on Windows, and Home/NetBeansProjects folder, on Ubuntu (Linux).

    In case the folder isn't there, click on Help, select About and check under Userdir. , Open up Command Prompt/Terminal or make a batch file that has this line included: java
    -jar "<name of jar file>".
  2. Step 2: Open Project Properties.

  3. Step 3: Mark the Checkbox Compress JAR File.

  4. Step 4: Confirm the Change.

  5. Step 5: Build your Project.

  6. Step 6: Locate your JAR file.

  7. Step 7: Know How to Run It.

Detailed Guide

Right click on the name of the project you want to generate a JAR file from, and select Properties from a drop down menu. , On your Properties window, look at the list of Categories on the left side.

Go over to Build and under it should be Packaging, click on it.

You should see Compress JAR File checkbox on the right, mark it. , Press the OK button at the bottom right. , There are several ways to it, but the easiest one is to press a button with an icon of a hammer next to the drop down menu for running configuration. , Most common one is in My Documents/NetBeansProjects, on Windows, and Home/NetBeansProjects folder, on Ubuntu (Linux).

In case the folder isn't there, click on Help, select About and check under Userdir. , Open up Command Prompt/Terminal or make a batch file that has this line included: java
-jar "<name of jar file>".

About the Author

I

Isabella Turner

Creates helpful guides on crafts to inspire and educate readers.

146 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: