The JAR Contents Property Editor

See Also

The JAR Contents property editor enables you to specify which files you would like included in the JAR file that you create.

You can open the JAR Contents property editor from the JAR recipe file's property sheet. Right-click the JAR recipe file and choose Properties. Select the Contents property and click the ellipsis (...) button.

Select directories and files in the Source panel. Then click Add add them to the JAR file. When you add a directory to a JAR file, you also add all of its contents.

Source Panel

The Source panel displays a tree view of all filesystems mounted and visible in the Filesystems window. You can navigate this tree and select directories you would like to add to your JAR file. When you select a directory to add, click the Add button in the middle of the property editor.

Chosen Content Panel

Files and directories appear in the Chosen Content panel after you have selected them in the Source panel and clicked Add. You can remove entries from Chosen Content by clicking Remove All. Or you can select the entry you want to remove and click Remove.

In the Directory Prefix field, you can deepen the path of the files that you are about to add to the Chosen Content panel. For example, if a file's path is MyPackage/MyClass.class by default and you type org/acme/ in the Directory Prefix field, the directory structure in the JAR file becomes org/acme/MyPackage/MyClass.class.

Set the prefix before you add entries to the Chosen Content panel. The prefix does not apply to entries that you have already added.

The Target Directory field shows in which directory the chosen content will appear in the JAR file. You can edit this field if you want to change the target for that particular entry. This field is empty for entries you have added without a relative root or a prefix. However, the entries maintain their default package structure in the resulting JAR file.

The Target Name field applies only to items that are individual files. You can specify that the item is included in the JAR with a different file name. If you leave this field blank, the source file's name is used.

See Also
Modifying a JAR File
Updating a JAR File
Setting a JAR Content Filter
Setting JAR Packager Options

Legal Notices