The manifest file is the place where any meta-information about the archive is stored.



Please save me.

A man is drowning in a river. He evokes Lord Ganesha's blessings to save him. Soon he sees Ganesha dancing in front of him. Again he pleads for help, but Ganesha keeps dancing cheerfully. Ultimately he drowns and dies. When he finally reaches heaven, he is furious to find Ganesha sitting there and smiling. "So why didn't you save me?" He asks Ganesha. "Why should I save you?" replies Ganesha, "Don't you drown me every year on Ganesha Mahotsava? This was a good opportunity to settle scores."

Chapter 1 Executable Java Archives

The Java Archive Tool (jar)

The jar utility is a Java application that combines and compresses multiple files into a single JAR archive file.

jar [options] [manifest] destination input-file [input-files]

The three types of input files for the jar tool are:

manifest file (optional)
destination jar file
files to be archived

A manifest file is automatically generated by the jar utility. If you want to specify a manifest file for the new jar archive, you can specify it using the -m option.


Creating Manifest File

Open any text editor like notepad or wordpad and type the following:

Main-Class: MyFrame

You can view MyFrame.mft file in the "examples\Chapter1" directory of this tutorial to get help.


A manifest file that you use must end with a new line. The last line of a manifest file will not be parsed, if it does not end with a new line character.


Contents         Top                              Move to the preceding page Move to the next page
© 2001 www.universalteacher.com. All rights reserved