Building a JAR File

See Also 

In , the IDE builds a JAR file from your project sources every time you run the Build command. The JAR file is generated to the dist directory of your project folder.

To change the JAR name and location:

  1. In the Files window, go to the nbproject folder in your project folder and open project.properties.
  2. Enter the full path to the JAR file in the dist.jar property.

To specify which files are added to the JAR file:

  1. Right-click the project node in the Projects window and choose Properties.
  2. Click Creating JAR and configure the filter and compression settings.

To specify the manifest file for the JAR file:

tip If you are using the Java Application template, the IDE creates a manifest file for you.

To disable generation of a JAR file for a project:

  1. In the Files window, open your project folder and open build.xml.
  2. Override the jar target to have no contents and no dependencies. For example, add the following to build.xml:
    <target name="jar" />
tip In , JAR file creation is controlled by your Ant script.
See also
Building Tasks: Quick Reference
Building a Project
Compiling a Single File
Managing the Classpath
Customizing the Ant Build Script

Legal Notices