File Formats
  • Audio
  • Video
  • Images
  • 3D & CAD
  • Documents
  • Data
  • Code
  • System
Code
  • Source code
  • Bytecode
  • Programs & libraries
  • Object files
  • Debug info
  • Firmware & ROMs
  • Notebooks
  • Shaders
  • Build files
  • Packages & installers
  1. Home
  2. Code
  3. Packages & installers
  4. JAR
.JAR
  • Overview

.JAR

Java archive

Introduction

A .jar file packs a Java program or library into one file: its compiled .class files, the resources they use and a manifest. A JAR whose manifest names a main class can be run directly with java -jar, and libraries are shared as JARs through repositories such as Maven Central.

Several other formats are JARs with extra rules, such as web application archives (.war) and enterprise archives (.ear).

Software

  • OpenJDK, with java to run them and the jar tool to make and list them (Windows, macOS, Linux)
  • IntelliJ IDEA (Windows, macOS, Linux)
  • Eclipse (Windows, macOS, Linux)
  • JD-GUI (Windows, macOS, Linux)
  • 7-Zip (Windows)

Structure

A JAR is a ZIP archive. The class files sit in folders that follow their package names, so the class com.example.App is stored as com/example/App.class. The META-INF/ folder holds the manifest, META-INF/MANIFEST.MF, a text file of Name: value lines such as Main-Class and Class-Path. A signed JAR adds a signature file and a signature block there too, and a JAR that provides services lists them under META-INF/services/.

Manifest-Version: 1.0
Main-Class: com.example.App
Class-Path: lib/library.jar
Created-By: 21 (Eclipse Adoptium)
A manifest naming the class to run and a library it needs.
© 2026 fileformats.org About Contact Made by Lewpen