It is a metadata file that contains name-value pairs organized in different sections.
If a JAR file is intended to be used as an executable file, the manifest file specifies the main class of the application. The manifest file is named MANIFEST.MF
Other uses are:
- store hashes of stored files for signature validation
- sealing jar files (i.e. ensure that only classes from this jar file are loaded in the packages defined in this jar file).
- store version/product/producer information to be readable at runtime
The Main class to be called once the JAR is executed is defined as below
If an application is bundled in a JAR file, the Java Virtual Machine needs to be told what the entry point to the application is. An entry point is any class with a public static void main(String[] args) method
Manifest-Version: 1.0 Main-Class: com.mugil.util.Test