A JAR file (short for “Java Archive”) is a compressed directory file, similar to a Zip file. Extracting a JAR file means you are unpacking the contents of the Java Archive into a specific folder. Once extracted, you can access each document stored within the JAR Archive. While JAR files are easy to open on Windows, they are not natively compatible with Mac and Linux operating systems. Therefore, the extraction process varies depending on the operating system.
Steps
On Windows

Open “This PC”, "Computer", or “My Computer”. On Windows 10, “My Computer” is labeled as “This PC”.
- Windows 10: First, click on the File Explorer icon. The icon features a yellow folder on a blue document holder, located on the bottom taskbar. Then, select "This PC" from the left-hand sidebar of the window.
- Windows 8: Right-click on an empty space. Choose "All Apps" from the bottom menu bar. Navigate to the section labeled "Windows System". Double-click on "Computer".
- Windows 7: Open the Start menu and select "My Computer".

Identify the drive containing the JAR file. The "This PC" window will display all the drives on your computer. The JAR file is stored in one of these drives. Take note of the uppercase letter to the right of the drive name, as you will need to enter it in the command line environment.

Navigate to the JAR file you wish to extract.

Click on the file to select it.

Click on the search bar at the top of the window. The file path will appear, showing each drive and folder you opened to reach the file (excluding the file name).

the file path.

Open “Command Prompt”.
- On your keyboard, press the Windows key + R to launch the "Run" program. Type "cmd" and press ↵ Enter. The Command Prompt window will open.

Enter the drive letter into the command line. Remember, this letter is located to the right of the drive name.
- For example, if the file is in the “Local Disk (C):” drive, type “c”.

Type “d” immediately after. The “d” represents the directory. Ensure there is no space between the drive letter and “d”.
- For example: “cd”.

Add a space and paste the file path.
- For example: “cd C:\Program Files\Java\jdk1.7.0_79\bin”.

Press the Enter key.

Type “jar xf” into the command line. This is the command to extract a JAR file.
- “x” stands for “extract”.
- “f” stands for “file”.
- When combined, “xf” means you want to extract the specified file in the command line.

Press the spacebar once and then enter the name of the JAR file.
- For example: “xf myjarfile.jar”.

Press Enter to extract the entire JAR file. All contents within the JAR file will be decompressed and appear in the same location as the original file.

Extract specific data from the JAR file. If you know exactly which document you need, there’s no need to decompress the entire JAR file. Instead, you can extract only the desired file.
- After typing “xf myjarfile.jar”, press the spacebar once.
- Enter the name of the file you want to extract. You must enter the exact name as it appears in the JAR file.
- If you want to extract multiple files, press the spacebar and enter another file name.
- Repeat this process until you’ve listed all the files you need to extract.

Press the Enter key. All the files you listed will be extracted and appear in the same location as the JAR file.
On Mac

Click on the JAR file to select it.
Click on the file name. This action allows you to edit the name and file type.

Remove the “.jar” extension at the end of the file name. Without the appropriate software, a Mac cannot extract contents from a JAR file.
- In this example, the JAR file is named “myjarfile.jar”. After removing the “.jar” extension, the file name becomes “myjarfile”.

Add “.zip” to the end of the file name. Mac computers can extract or compress files. By changing the file type, you won’t need to download a JAR extraction program.
- For example, it will now be: “myjarfile.zip”.

Press the Enter key. A window will appear with the message: “Are you sure you want to change the extension from “.jar” to “.zip”?”

Click on Use .zip. The JAR file will be converted into a ZIP file. All contents compressed in the original JAR file will appear in a folder with the same name.
On Linux

Drag the JAR file to the desktop.

Right-click on the file. A menu will pop up.

Select “Rename”.

Highlight the entire file name.

Right-click on the highlighted name. A menu will appear.

Choose “”. This file name will be pasted into the Terminal.

Press the Cancel key to exit the “Rename” window.

Right-click on the desktop. A menu will appear.

Select “Open Terminal Here”. The Terminal will open on the screen.

Type “java” into the command line.

Press the spacebar once.

Enter “-jar”. The “-” is a hyphen.

Press the spacebar once again.

Select “Edit” from the options menu at the top of the Terminal window.

Choose “Paste”.

Press the Enter key. You can now access the contents of the JAR file.
