Creating a new JAR file

To create a new JAR file in the workbench:
  1. In the Package Explorer, you can optionally pre-select one or more Java elements to export. (These will be automatically selected in the JAR Package Specification wizard page, described in Step 4.)

  2. From the menu bar, select File > Export.

  3. Select JAR file, then click Next.

  4. In the Jar Package Specification page, select the resources that you want to export in the Select the resources to export field.

  5. Select the appropriate check box to specify whether you want to Export generated class files and resources or Export Java source files and resources.

    Note: Selected resources are exported in both cases.

  6. In the Select the export destination field, either type or click Browse to select a location for the JAR file.

  7. Select or clear the Compress the contents of the JAR file check box.

  8. Select or clear the Overwrite existing files without warning check box. If you clear this check box, then you will be prompted to confirm the replacement of each file that will be overwritten.

  9. Note: The overwrite option is applied when writing the JAR file, the JAR description, and the manifest file.

  10. You have two options:

Related concepts
Java development tools (JDT)

Related tasks
Adding a JAR file to the build path
Attaching source to a JAR file
Defining the JAR file's manifest
Setting advanced options

Related reference
JAR file exporter
Package Explorer

Copyright IBM Corporation 2000, 2002. All Rights Reserved.