O'Reilly logo

Developing Java Beans by Robert Englander

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Manifest

The jar program automatically generates a manifest when the archive is created (unless you specify the M option). The manifest is always named manifest.mf and placed into a directory named META-INF, and is made up of one or more sections, each of which describes an entry in the archive. Sections in the manifest are separated by a blank line.

Each section in the manifest contains a series of attribute/value pairs. These pairs are used to specify various attributes of the contents of the archive. The entries in the manifest take the form attribute: value, where the attribute is immediately followed by a colon and whitespace, and then the value. The first section in the archive is used to identify the manifest version used by the archive. The name of the attribute is Manifest-Version. The only version currently supported is 1.0, so the first section of the manifest looks like this: Manifest-Version: 1.0

The version section is followed by sections that describe the elements contained in the archive. Each section contains an attribute called Name that identifies the name of the archived element. The jar program also produces some hash values for the archived element. Each of these values is entered into the manifest. The Digest-Algorithms attribute specifies one or more hash algorithms used to generate hash values for the element. This is followed by attributes for each of the algorithms, with the associated hash value.

To get a better idea of what these entries look ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required