.jar files
.jar file
Java Archive
A zip of compiled Java classes — a library, or a runnable program.
What opens a .jar file
- Windows
- Java Runtime Environment (java -jar), 7-Zip (to inspect contents)
- macOS
- Java Runtime Environment (java -jar), Archive Utility (built in, to inspect)
- Linux
- Java Runtime Environment (java -jar), Archive Manager (to inspect)
What a .jar file is
A JAR is a ZIP archive of Java bytecode plus a manifest, which may mark it as executable. Running one needs a Java runtime installed; with Java present, double-clicking usually works on Windows and macOS, and java -jar file.jar always does. Most JARs are libraries meant to be used by other code rather than launched, and Minecraft mods are the usual reason a non-developer has one.
Converting it
A .jar file is commonly converted to .zip, .exe or .war. It is a binary format, so a text editor will show unreadable characters rather than its contents.
Details
- Extension
- .jar
- Full name
- Java Archive
- Category
- Programs and installers
- MIME type
- application/java-archive
- Created by
- Sun Microsystems / Oracle
- Format
- Binary
Common questions
- How do I open a .jar file?
- On Windows use Java Runtime Environment (java -jar); on macOS use Java Runtime Environment (java -jar); on Linux use Java Runtime Environment (java -jar). A zip of compiled Java classes — a library, or a runnable program.
- What is a .jar file?
- Java Archive. A JAR is a ZIP archive of Java bytecode plus a manifest, which may mark it as executable. Running one needs a Java runtime installed; with Java present, double-clicking usually works on Windows and macOS, and java -jar file.jar always does.
- Can I convert a .jar file?
- Yes. It is usually converted to .zip, .exe or .war, either by exporting from one of the programs listed above or with a format converter.
Related pages
- .exe — Windows Executable A Windows program. It runs code, which is why it is also the classic way to get
- .apk — Android Application Package An Android app installer — a zip of code and resources.
- .msi — Windows Installer Package A structured Windows installer that the OS installs and can cleanly uninstall.
- .dll — Dynamic Link Library Shared Windows code that programs load — not something you open or run.
- .sh — Shell Script A text file of Unix shell commands, run by bash, zsh or sh.
- .deb — Debian Software Package The installer format for Debian, Ubuntu and their derivatives.
- .bat — Windows Batch File A plain-text list of Command Prompt commands that runs when you double-click it.
- .pkg — macOS Installer Package A macOS installer that runs a guided setup, rather than a drag-and-drop app.
- .ps1 — PowerShell Script A script for Windows PowerShell — Microsoft's modern automation shell.
- .ipa — iOS Application Archive An iPhone or iPad app package — installable only through Apple-sanctioned channe
- .rpm — RPM Package The installer format for Fedora, Red Hat, openSUSE and their relatives.
- .appimage — AppImage Portable Application A whole Linux application in one file that runs without being installed.
Sources
- Media Types Registry — IANA
- Official vendor product documentation — At One Place