Wednesday, May 28, 2008

Significance of the Manifest File in a JAR?


Question: Significance of the Manifest File in a JAR?

Answer: The Manifest File in a JAR contains meta-information (information about other information) about the other contents of it.

One common usage of Manifest File is to specify the entry point of a stand-alone application bundled as a JAR. The Main-Class header is used to specify the class whose main method will be called to start the execution if the JAR file is run by the command "java -jar JarFileName.jar".

Other uses of Manifest File is to provide information about Dependencies of the JAR file on other JAR files, Version of the JAR file, Security Information, etc.

This file exists in the META-INF directory of the JAR with the filename "MANIFEST.mf".



Share/Save/Bookmark


No comments: