Building a JAR File

See Also

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

To specify which files are added to the JAR file:

  1. Right-click the project node in the Projects window and choose Properties.
  2. Select the Packaging node in the dialog's left pane.
  3. Specify the files to exclude and any additional settings in the right pane.

To disable generation of a JAR file for a project, perform the following steps.

  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" />

Alternatively, if you deselect the Build JAR after Compiling option in the Packaging category of the Properties window the Java compiler will produce only .class files, without building JAR files.

See also
Building Tasks: Quick Reference
Building a Project
Compiling a Single File
Managing the Classpath
Setting the Main Class and Runtime Arguments
Customizing the Ant Build Script
Preparing a JAR File for Deployment Outside the IDE

Legal Notices