How to View MANIFEST.MF in a JAR File

Locate the manifest, read its main attributes and diagnose why a Java archive may not launch as expected.

Quick answer

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

  1. Open the JAR with Jar File Opener.
  2. Open the META-INF directory at the archive root.
  3. Select MANIFEST.MF and choose the text view.
  4. Read the main section at the beginning of the file. It applies to the archive as a whole.
  5. If more sections follow, check their Name attributes 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-Version

Manifest format version

Identifies the manifest specification version. The main section normally begins with this attribute.

Main-Class

Application entry point

The binary class name the Java launcher loads for java -jar. Use dots between package names and do not append .class.

Class-Path

External dependencies

A space-separated list of relative URLs for JAR files or directories the application needs in addition to its own archive.

Created-By

Generating tool

Often records the Java implementation and version that generated the manifest. It does not prove which runtime is required.

Automatic-Module-Name

Stable module name

Defines a module name when the JAR is placed on the module path as an automatic module.

Multi-Release

Versioned classes

When set to true, supported runtimes may use version-specific entries under META-INF/versions/.

Signature-Version

Signing metadata

Identifies the signature format when signing information is used. Complete verification requires more than reading this field.

Name

Per-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-Class uses a binary class name such as com.example.Main, not a path and not com/example/Main.class.
  • Class-Path entries 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.
Long-Attribute: This value starts on one line and continues here because the continuation begins with a space.

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:

java -cp app.jar com.example.Main

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.

jar tf app.jar jar xf app.jar META-INF/MANIFEST.MF

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-Path entry 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.