- Choose Tools
Jar Packager from the main window.
- In the JAR Archive panel of the JAR Packager window, specify the target location and the name for your new archive.
You can either type the name and location into the JAR Archive text field or click Browse
to navigate to the directory where you want to place the new archive. If you want to access commands to modify
the contents of the JAR file (Manage JAR) or recompile its sources (Update JAR Content),
place the JAR file in a directory that is mounted in Filesystems.
- Select the Mount as Separate Filesystem checkbox if you want to be able to view
the hierarchy of the JAR file's directories and files in the Explorer.
- In the middle panel of the dialog box, click the Content tab.
- From the tree view, select the files and directories to include in the JAR
and click the Add button.
If you make a mistake when selecting the JAR file's content, you can start over by clicking the Clear button.
Or you can select a file
or directory that you have mistakenly chosen in the Chosen Content panel and click Remove.
You can select multiple files by
holding down Ctrl or Shift while clicking on file names and directories.
- Select a filter from the Common Filter combo box to determine which files will be included in the archive, or you can create a
regular expression filter.
- Select Compress Content if you wish the contents of the JAR file to be stored using compression.
Use the slider to determine the level of compression, from 0 (none) to 9 (most). Higher compression
reduces network download time but increases loading time in the IDE.
- Click the Manifest tab in the middle panel to display some manifest creation options.
You can generate basic attributes, manually edit the manifest, or load the manifest attributes from another file.
- Click Create JAR.
The JAR file is then created, along with a corresponding .jarContent
file, which contains information about the JAR file's contents and which the IDE
uses when you want to update or modify the JAR file. To use these commands, you must keep the JAR file in the same directory
as the .jarContent
file. If you create the JAR file in a mounted filesystem,
the JAR file and its .jarContent
file are represented together with the
icon. You can use the Manage JAR and Update JAR Content
commands by right-clicking this node.
If you selected the Mount As Separate Filesystem checkbox, a JAR
filesystem node appears with the
icon. You can browse the contents of
the JAR file on this node as if the JAR file was a directory, though you cannot edit the files.