FILE FORMAT GUIDE

JAR File: Browse a Java Archive Before Running It

A JAR file is a Java archive that groups classes and resources. You can list its contents without launching the application. Running a JAR is a separate task that requires a suitable Java runtime and an application entry point.

Quick facts

Extension
.jar
Format
Java Archive
Category
archive
MIME type
application/java-archive
Standard / developer
Java Community Process / Oracle
Open with
7-Zip

What is JAR?

JAR uses ZIP packaging and may contain META-INF metadata. Some JARs are application libraries rather than standalone programs. A Main-Class manifest attribute identifies the entry point used by the Java launcher for an executable JAR.

How to open JAR

Browsing an archive and executing its Java application are separate actions. Obtain the intended runtime instructions from its publisher.

7-ZipWindows

Open the JAR as an archive to browse its entries rather than launching the contained application.

Common uses and compatibility

  • Package Java classes and resources into one archive.
  • Distribute libraries or applications for a Java-based workflow.

Things to check

  • A JAR can contain executable content; viewing its listing does not prove that running it is safe.
  • An executable JAR may still require a particular Java runtime, operating system or machine architecture.

Advanced inspection

These developer and command-line workflows inspect structure or metadata. They are not the default way most people open the file.

JDK jar toolCommand line; JDK tools required

Use jar --list --file "example.jar" to list entries without launching its application.

Technical details

Signature
Common ZIP header: 50 4B 03 04; shared with other ZIP-based formats, not a unique JAR identifier
Encoding
Unknown
Container
ZIP-based Java archive; META-INF metadata is optional
Compression
ZIP-based packaging; a JAR can be compressed or uncompressed

JAR File Specification — Java SE 25

Browse a JAR without starting its application

Use a compatible archive reader such as 7-Zip to browse the file. With JDK tools installed, the jar command can list entry names. Listing and extracting are different operations; neither requires launching the application’s Main-Class.

List entries with JDK tools

jar --list --file "example.jar"

Sources: 7-Zip: supported archive formats · The jar command — Oracle Java SE 25 · 7-Zip ZIP handler registers JAR archives — official source

Why does double-clicking the JAR not start a program?

Not every JAR is a standalone application. The Java launcher’s -jar mode needs a manifest entry point. If the file is a library, use it through the application or build workflow that supplied it instead of guessing a main class.

Sources: The java command — Oracle Java SE 25 · JAR File Specification — Oracle Java SE 25

What should I check before running an application JAR?

Confirm its origin and the publisher’s runtime requirements first. If execution is intended, java -jar starts the declared application. That command executes code; it is not an archive-inspection or file-repair command.

Sources: The java command — Oracle Java SE 25 · application/java-archive — IANA

Does a ZIP signature prove the file is a valid JAR?

IANA registers application/java-archive and the common PK header. That prefix is shared with ZIP-based formats. It does not establish a valid manifest, correct application dependencies or a trustworthy publisher.

Sources: application/java-archive — IANA · JAR File Specification — Oracle Java SE 25

Related formats

Sources & review

Sources reviewed 2026-11-15.