When it comes to saving a file, the number one rule is to give it a clear name that lets users know what it contains without them having to open it. A file ending is often au­to­mat­i­cal­ly assigned depending on the file format. The different endings are useful because they tell users and their systems whether a file is an image, audio or video file, and which programs are suitable to open it. Besides common examples like .jpg, .mp3 or .png, there are a wide range of other file endings. The .jar format is a less familiar file type, and simply double-clicking on this file type will neither open nor run it.

$1 Domain Names – Grab your favorite one
  • Simple reg­is­tra­tion
  • Premium TLDs at great prices
  • 24/7 personal con­sul­tant included
  • Free privacy pro­tec­tion for eligible domains

What are .jar files?

The .jar ending concerns two file types related to the pro­gram­ming language Java. For instance, a .jar file can be a Java ap­pli­ca­tion – i.e. a launch­able program. If you want to run a .jar file skip ahead to the section “Running a .jar File”.

In most cases, however, a .jar file contains a library of multiple files. The file ending .jar is the ab­bre­vi­a­tion for “Java archive”. These archives usually contain multiple Java files and metadata that can be sent compiled and com­pressed. In addition to .jar files, they may also contain images, audio files and other file formats. Therefore, it works like a .zip file.

These libraries are typically used to simplify the pro­gram­ming of Java ap­pli­ca­tions and applets. The archive of meta in­for­ma­tion, XML or JSON files, images and sound files can be in­te­grat­ed as a fixed component into other projects. An important part of such Java libraries is the manifest: This file contains details about the version and the author of the code. If the archive concerns an ex­e­cutable file, ad­di­tion­al in­for­ma­tion will be available.

Note

Oracle launched the platform-in­de­pen­dent and object-oriented pro­gram­ming language Java back in the 1990s. The language is con­sid­ered to be an im­per­a­tive pro­gram­ming languages because of its clear command structure.

Opening a .jar File: how it works

To gain access to the in­di­vid­ual files in a Java archive, you need to unpack the library. This can be done in a similar way to .zip files. The following com­pres­sion programs support the .jar file format when unpacking:

  • WinRAR: One of the most popular free tools for unpacking com­pressed files.
  • WinZip: The standard version is available with a range of options at a low price.
  • 7-Zip: Offers its own efficient file form .7z for archiving.
  • Ul­ti­mateZip: A free al­ter­na­tive for Windows users.
  • WinAce: A paid program with an integrity check.
  • IZArc2Go: Starts without in­stalling external data media.
  • HaoZip: Supports 50 file formats.

If you have a program, unpack the .jar file. You have two ways to do so:

Open the .jar file in the com­pres­sion program

Open the installed com­pres­sion program. Then, select the .jar file via the file path or drag it directly into the program. Select the “Unpack” option and follow the program’s in­struc­tions.

Select the com­pres­sion program in the context menu

Right-click on the .jar file. Next, select the option “Open with” from the context menu, followed by the cor­re­spond­ing com­pres­sion program.

Once the process has finished and the archive is unpacked, open the file with a double-click. Once opened, you should be able to see a list of all the files it contains. The file format is easily rec­og­niz­able by the file endings, and indicates whether you can open the files. Common formats can be opened by double-clicking on them. To select a different program to run a file, launch the context menu by right-clicking on the file. Then, select the option “Open with” using the left mouse button and choose the relevant program.

Running a .jar file

If the Java archive contains ex­e­cutable .jar files or if the file itself is ex­e­cutable, you will need to use a special program. The most common program Java Runtime En­vi­ron­ment (JRE) is available to download for free for Windows and macOS operating systems from the Java website. After in­stalling the program, run the .jar file by double-clicking on it. JRE is a runtime en­vi­ron­ment that runs files in­de­pen­dent from the operating system, thanks to a virtual machine – the Java Virtual Machine (JVM).

If you wish to develop Java ap­pli­ca­tions yourself (and create your own .jar files), you will need to use the Java De­vel­op­ment Kit (JDK). OpenJDK is a free open-source software program that is available to download for free.

Note

Java is platform-in­de­pen­dent and, thus, is popular among malware pro­gram­mers. For this reason, you should only run .jar files from familiar senders or trust­wor­thy sources! If in doubt, it’s a good idea to run a check using an antivirus program.

Go to Main Menu