CLASS JAR
File conversion

Convert CLASS to JAR

QUICK ANSWER
Is it possible to convert CLASS to JAR?
Yes - CLASS converts to JAR.

Run jar cfe app.jar MainClass *.class in a terminal with the JDK installed to create a runnable JAR. Packaging is purely an archiving step - the .class files inside are byte-for-byte identical to the originals. Without a Main-Class entry in the manifest, java -jar app.jar will fail.

Also to JAR: JAVA · PACK · DEX

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert CLASS to JAR?

Loose .class files are inconvenient to distribute or run. A JAR bundles everything into a single file and, with a manifest entry, lets users launch the application with java -jar instead of managing classpaths and individual class files.

How to convert CLASS to JAR

jar (JDK) FREE

Navigate to the directory with your .class files and run jar cfe app.jar com.example.MainClass *.class to create a runnable JAR. Omit the e flag and main-class argument to create a library JAR instead.

IntelliJ IDEA Community FREE

Go to File > Project Structure > Artifacts, add a JAR from modules with dependencies, set the main class, and run Build > Build Artifacts.

Eclipse IDE FREE

Right-click the project, choose Export > Java > Runnable JAR file, select the launch configuration, set the output path, and click Finish.

About these formats

Quality & what to watch

  • A JAR is a ZIP archive; rename it to .zip to inspect the contents in any archive manager. The META-INF/MANIFEST.MF file controls how Java handles it.
  • Without a Main-Class attribute in the manifest, java -jar app.jar fails - use jar cfe (not jar cf) to set the entry point.
  • The bytecode is unchanged; packaging into a JAR is purely archiving and does not alter the .class files.

Frequently asked questions

Do I need the JRE or the JDK to create a JAR?
You need the JDK - the jar command ships with the JDK, not the JRE.
How do I check what is inside an existing JAR?
Run jar tf app.jar in a terminal, or rename the .jar to .zip and open it in any archive manager.
Can I add resource files (images, config) to the JAR?
Yes - list them alongside the .class files in the jar command, or use your IDE's artifact builder to include them.