Creating a JAR Manifest

In the IDE, there are two ways to specify a manifest for a JAR file:

To add the manifest when you specify the contents of the JAR file:

  1. Write the manifest and save it to a file named MANIFEST.MF. The file must be saved in a directory that is mounted in the IDE.
  2. Create a JAR recipe file. See Creating a JAR File for more information.
  3. In the Specify JAR Recipe Contents pane of the New wizard, add the MANIFEST.MF file to JAR recipe.
  4. In the Modify JAR Recipe Contents pane of the New wizard, set the Target Directory for the MANIFEST.MF file to META-INF.
  5. Do not type, generate, or load any text in the JAR Manifest pane. Manifest information that you provide in this pane overrides any manifest that you specify as part of the JAR Recipe contents.

If the JAR recipe has already been created, you can change the specified manifest through the JAR recipe node's property sheet. Edit the Contents property to add the manifest to the JAR contents. Edit the Manifest property to delete a manifest you have previously created in the JAR Manifest pane.

To use the Manifest property editor to specify the manifest:

  1. Select the JAR recipe node for the JAR file in the Explorer.
  2. If the Properties window is not open, right-click the JAR recipe node and choose Properties.
  3. On the property sheet, select the Manifest property and click the ellipsis (...) button.
  4. In the Manifest property editor, you can:

If you click Load Manifest From File, any text in the text area is replaced by the loaded text. If you click Generate, any matching basic attributes are replaced and any syntactically incorrect entries are removed.

Tip For information on manifest syntax, visit http://java.sun.com/products/jdk/1.2/docs/guide/jar/manifest.html.
See also
Creating a JAR File
The JAR Contents Property Editor
Modifying a JAR File
Updating a JAR File
Running a JAR File
Setting a JAR Content Filter

Legal Notices