Jarring the Files

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

Use the following format for the manifest file:

Manifest-Version: 1.0

Name: com/engineous/unit/length/meter/meter.xml
Meta-Model: true

Replace the values of any item as necessary. You must replace the name with the path to the XML descriptor file for this unit (starting at the sourcedir as defined above). 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 when using it. Execute the following command from a command prompt:

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

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

This example creates a jar file MyNewJar.jar with the given manifest and includes all the files in the sourcedir directory and all its subdirectories.