Jarring the Files

The jar file requires a manifest file that specifies summary information of the contents of the jar file.

The manifest file should be in the following format:

Manifest-Version: 1.0

Name: com/engineous/component/Plate.xml
Meta-Model: true

Replace the Created-By value with the author name and replace the Name item with the path to the XML descriptor file for this component (starting at the sourcedir as defined in Organizing the Files). It is important to leave one blank line between the Manifest Version and the Name: line. Place this manifest file directly at the top level of the sourcedir.

Type jar at a command prompt to provide usage instructions for the jar command. If the jar command is not found, locate it in your jdk1.6\bin directory and either add it to your PATH environment variable or type the full path to it.

Execute the following command from a command prompt:

jar -cvfm MyNewJar.jar MyManifest.mf -C sourcedir/

Replace the desired jar file name, manifest file name, and source directory with the appropriate names.

This command will create a jar file MyNewJar.jar with the given manifest. The jar file will include all the files in the sourcedir directory and all of its subdirectories.