Creating a JAR File

To create a JAR file in the IDE, you must first create a JAR contents file. The JAR contents file stores information about your JAR file, which you can later modify and use to create a new JAR file.

To create a JAR contents file:

  1. Choose File New from the main window.
  2. In the first panel of the New From Template wizard, expand the JAR Packager node, choose JAR Contents, and click Next.
  3. In the Target Location panel, type the name and specify the package for the JAR Contents file, and click Next.
  4. In the JAR Contents panel, select the files or directories you want to put in the JAR file, and click Add. You can select multiple files by holding down Ctrl or Shift while clicking on file names and directories. Click Next.

    For a more detailed description of this panel, see The JAR Contents Property Editor.

  5. In the JAR Location panel, type the name and location for the JAR file and click Next.
  6. In the JAR Manifest panel, enter the text for the JAR file's manifest and click Finish. For more information on creating the JAR manifest, see Creating a JAR Manifest.

    The JAR Contents file appears as a node in the Explorer (with the icon). On the node's property sheet, you can set a file filter, the JAR file's compression level, and other attributes.

To create a JAR file from a JAR contents file:

To view the contents of the JAR file as a filesystem:

See also
The JAR Contents Property Editor
Modifying a JAR File
Updating a JAR File
Running a JAR File
Setting a JAR Content Filter
Creating a JAR Manifest

Filesystems and the Java Classpath
Mounting a Filesystem

Legal Notices