Open META-INF/MANIFEST.MF
The standard JAR manifest is stored at META-INF/MANIFEST.MF. Open the JAR as an archive, enter the META-INF folder and view MANIFEST.MF as text. Look for Main-Class if you need the application's launch class, and Class-Path if the archive declares external libraries.
View MANIFEST.MF on Android
- Open the JAR with Jar File Opener.
- Open the
META-INFdirectory at the archive root. - Select
MANIFEST.MFand choose the text view. - Read the main section at the beginning of the file. It applies to the archive as a whole.
- If more sections follow, check their
Nameattributes to see which archive entries they describe.
Example MANIFEST.MF
This example declares a runnable main class, two relative library dependencies, a stable automatic-module name and multi-release content.
Manifest-Version: 1.0 Main-Class: com.example.Main Class-Path: lib/helper.jar lib/logging.jar Automatic-Module-Name: com.example.application Multi-Release: true Created-By: 21.0.2 (Example JDK)
Common manifest attributes explained
Manifest-VersionManifest format version
Identifies the manifest specification version. The main section normally begins with this attribute.
Main-ClassApplication entry point
The binary class name the Java launcher loads for java -jar. Use dots between package names and do not append .class.
Class-PathExternal dependencies
A space-separated list of relative URLs for JAR files or directories the application needs in addition to its own archive.
Created-ByGenerating tool
Often records the Java implementation and version that generated the manifest. It does not prove which runtime is required.
Automatic-Module-NameStable module name
Defines a module name when the JAR is placed on the module path as an automatic module.
Multi-ReleaseVersioned classes
When set to true, supported runtimes may use version-specific entries under META-INF/versions/.
Signature-VersionSigning metadata
Identifies the signature format when signing information is used. Complete verification requires more than reading this field.
NamePer-entry section
Starts a section whose following attributes apply to a specific file or resource inside the archive.
MANIFEST.MF formatting rules
- Each header uses a name, a colon, a single space and a value:
Name: value. - A blank line terminates a section. The main section must be separated from following per-entry sections.
- A continued value begins on the next physical line with one space. Removing that leading space changes the syntax.
Main-Classuses a binary class name such ascom.example.Main, not a path and notcom/example/Main.class.Class-Pathentries are separated by spaces and resolved relative to the containing JAR's location.- Long values may be folded across continuation lines, so do not treat each physical line as a separate attribute.
What if Main-Class is missing?
A missing Main-Class does not necessarily mean the JAR is broken. Many archives are libraries, plugins, build outputs or containers used by another application. They are not intended to run directly with java -jar.
If the archive is supposed to be an application, check its documentation or build configuration. A known class with a valid public static void main(String[] args) method can sometimes be launched explicitly with a class path, but all dependencies must also be available:
View the manifest on Windows, macOS or Linux
The JDK's official jar tool can list the archive or extract only the manifest. Extract into a clean directory because existing files with the same path may be overwritten.
A ZIP-compatible utility can also read the text because JAR uses the ZIP container format. For example, many systems support unzip -p app.jar META-INF/MANIFEST.MF to print the file without extracting it.
Common manifest problems
- “no main manifest attribute”: the main section has no usable
Main-Class, or the manifest was packaged incorrectly. - Could not find or load main class: the named class is absent, misspelled, stored under a different package or depends on missing classes.
- Invalid header: a colon, required space, continuation line or section-ending blank line may be malformed.
- Missing dependency: a
Class-Pathentry may point to a JAR that is not present beside the application. - Unexpected class selected: build tooling may have merged manifests and replaced an attribute during packaging.
MANIFEST.MF FAQ
Does every JAR file have a MANIFEST.MF?
Standard JAR tooling normally creates one, but malformed archives or ZIP files merely renamed to .jar may not contain the conventional entry.
Does Main-Class include .class?
No. Use the fully qualified binary name, for example com.example.Main, without the .class suffix.
Can a JAR run without Main-Class?
It cannot be launched in the normal java -jar form without a usable entry point, but it may still work as a library or be launched through another framework or explicit class path.
Does Created-By tell me the required Java version?
No. It describes the implementation that generated the manifest. The class-file versions and APIs used are better indicators of runtime compatibility.
Do signature files prove the JAR is safe?
No. Signing data can help verify origin and integrity when properly validated, but the presence of .SF, .RSA or similar files is not a safety verdict.
Technical source
Attribute definitions and formatting rules follow Oracle's JAR File Specification. Last reviewed August 14, 2026.