Download ArticleDownload Article

JAR (.jar) files are archive files that contain Java class and associated metadata and resources. They are built on the ZIP format.[1] They are typically executed within a Java environment, but they can also be opened using archive programs like WinZIP, WinRAR, and 7-Zip. This How.com.vn teaches you how to extract a JAR file's contents.

Things You Should Know

  • Since JAR files work like ZIP files, you can use an archive program like WinRAR to extract them.
  • For Windows users, you can install Java SE to use the ‘jar’ extraction command in the Command Prompt.
  • If you’re a macOS user, you can also install and use Java SE. You’ll use the ‘jar’ command in the Terminal.
Method 1
Method 1 of 3:

Using an Archiving App

Download Article
  1. How.com.vn English: Step 1 Install an archive program.
    JAR files work just like ZIP files. You can use any archive program to extract them. On Windows, you can Install WinRAR 7-Zip, or WinZIP. Macs have their own built-in archive program called Archive Utility.[2]
  2. How.com.vn English: Step 2 Find the JAR file you want to extract.
    Use File Explorer (press Win + E to open File Explorer) or Finder on Mac to navigate to the JAR file you want to extract.
    Advertisement
  3. How.com.vn English: Step 3 Right-click the JAR file.
    Doing so prompts a drop-down menu.
  4. How.com.vn English: Step 4 Select Open with.
    It's in the drop-down menu. A pop-out menu will appear with programs you can use to open the file.
    • If you don't see this option, click the JAR file once, then right-click it again and select Open with.
  5. How.com.vn English: Step 5 Click the Archive program you want to use.
    You can use any archive program you have available on your computer.
    • On Mac, click Archive Utility.
  6. How.com.vn English: Step 6 Click Extract files or Extract here.
    "Extract files" gives you the option to select a destination to extract the file to. "Extract here" extracts the files to the same location the Jar file is located.
  7. How.com.vn English: Step 7 Select an extraction location.
    If necessary, click one of the folders on the right side of the window to select it as the location to which you want to extract your JAR file (WinRAR). If you are using 7-Zip, click the icon with three dots in the upper-right corner and navigate to the folder you want to extract the files to. Then click Ok.
  8. How.com.vn English: Step 8 Click OK.
    It's at the bottom of the WinRAR window. Doing so will extract your JAR file to the selected folder.
  9. Advertisement
Method 2
Method 2 of 3:

Using Java on Windows

Download Article
  1. How.com.vn English: Step 1 Make sure you have Java SE installed.
    If you don't have Java SE (the Java Developer Kit) installed, you won't be able to use the "jar" extraction command, and your file will be impossible to extract with this method:
  2. How.com.vn English: Step 2 Press ⊞ Win+E to open File Explorer icon.
    Click the folder-shaped File Explorer app icon in the taskbar that's at the bottom of your computer's screen.[3]
  3. How.com.vn English: Step 3 Go to the JAR file's location.
    Find the JAR file that you want to unzip.
  4. How.com.vn English: Step 4 Select the JAR file's path.
    Click a blank space in the address bar at the top of the File Explorer window to do so.
  5. How.com.vn English: Step 5 Press Ctrl+C to copy the path of the JAR file.
    This will save the path to your JAR file.
  6. How.com.vn English: Step 6 Open Start icon.
    Click the Windows logo in the bottom-left corner of the screen.
  7. How.com.vn English: Step 7 Type in cmd and press ↵ Enter.
    This opens the Windows Command Prompt.
  8. How.com.vn English: Step 8 Navigate to the JAR file's path location.
    To do this type in cd and press the space bar. Then press Ctrl+V to past the file's path. Then press "Enter"..
  9. How.com.vn English: Step 9 Type in jar xf followed by a space followed by the name of the JAR file.
    This is the command to extract a JAR file.[4]
    • For example, to extract a JAR file called "minecraft", you would type in jar xf minecraft.jar.
  10. How.com.vn English: Step 10 Press ↵ Enter.
    This executes the command and extracts the JAR file.
    • If you receive an error message that says "'jar' is not recognized as an external or internal command", you need to change the path environment variable to "C:\Program Files\Java\jdk[latest version]\bin" Make sure you replace "[latest version]" with the latest version of Java Development Kit you have installed.
  11. How.com.vn English: Step 11 Go back to the JAR file's location.
    You should now see the JAR file's extracted contents here.
  12. Advertisement
Method 3
Method 3 of 3:

Using Java on a Mac

Download Article
  1. How.com.vn English: Step 1 Make sure you have Java SE installed.
    If you don't have Java SE (the Java Developer Kit) installed, you won't be able to use the "jar" extraction command, and your file will be impossible to extract with this method:
  2. How.com.vn English: Step 2 Open icon Finder.
    Click the Finder app icon, which resembles a blue face, in your Mac's Dock.
  3. How.com.vn English: Step 3 Find your JAR file.
    Go to the location of the JAR file that you want to extract.
  4. How.com.vn English: Step 4 Select your JAR file.
    Click the JAR file once to do so.
  5. How.com.vn English: Step 5 Copy the JAR file's path.
    Use the following steps to copy the path of the JAR file:
    • Right-click the JAR file.
    • Hold OPTION and click Copy [jar file] as pathname.
  6. How.com.vn English: Step 6 Open Spotlight icon.
    Click the magnifying glass-shaped Spotlight icon in the top-right corner of the screen to do so.
  7. How.com.vn English: Step 7 Open Terminal icon.
    Type "terminal" into the Spotlight text box, then double-click the Terminal icon when it appears. This will open a Terminal window.
  8. How.com.vn English: Step 8 Type in jar xf and press the space bar.
    This is the command to extract a JAR file. Don't press enter just yet, there is still more you need to do.[5]
  9. How.com.vn English: Step 9 Press ⌘ Command+V to paste in your JAR file's path, and press ⏎ Return.
    This executes the command to extract the JAR file.
  10. How.com.vn English: Step 10 Go back to the JAR file's location.
    You should now see the JAR file's extracted contents here.
  11. Advertisement

Community Q&A

Search
Add New Question
  • Question
    I receive an error that jar is not recognized as an internal or external command, operable program or batch file. What do I need to do?
    How.com.vn English: Community Answer
    Community Answer
    You will need to make sure that the Java JDK is installed. Windows also requires for your environment variables to have a path set to the location of the jar executable. Check your Path Environment Variable under the Advanced System Settings in the Settings Window. Restart your computer when you make changes to your path.
  • Question
    I got an error that said java.io.FileNotFoundException (The system cannot find the file specified). What's up?
    How.com.vn English: Wizzwizz4
    Community Answer
    This means that you made an error typing the file path, and Java can't find the file. Check that you have typed the right file path.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
      Advertisement

      Video

      Tips

      • Popular versions of Linux, such as Ubuntu, allow you to extract JAR files by using the right-click menu: right-click the JAR file you want to extract, click Extract Here, click Close when prompted, and open the folder that's named after your JAR file.
      • If you're going to be running and extracting more than a few JAR files, installing Java is recommended.
      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Thanks for submitting a tip for review!
      Advertisement

      Warnings

      • While changing the .jar extension to a .zip extension on a Mac may sometimes allow you to extract the JAR, this method is more likely to cause an error.
      Advertisement

      About This Article

      How.com.vn English: Stan Kats
      Written by:
      Professional Technologist
      This article was written by Stan Kats and by How.com.vn staff writer, Darlene Antonelli, MA. Stan Kats is a Professional Technologist and the COO and Chief Technologist for The STG IT Consulting Group in West Hollywood, California. Stan provides comprehensive technology solutions to businesses through managed IT services, and for individuals through his consumer service business, Stan's Tech Garage. Stan holds a BA in International Relations from The University of Southern California. He began his career working in the Fortune 500 IT world. Stan founded his companies to offer an enterprise-level of expertise for small businesses and individuals. This article has been viewed 846,515 times.
      How helpful is this?
      Co-authors: 27
      Updated: March 26, 2024
      Views: 846,515
      Categories: File Manipulation
      Article SummaryX

      1. Make sure you have an archive program like WinRAR or 7-Zip installed.
      2. Navigate to the JAR file.
      3. Right-click the JAR file and select Open with.
      4. Click your choice archive program.
      5. Click Extract here or Extract file.
      6. Select a location to extract the file to (if needed).
      7. Click Ok..

      Did this summary help you?

      Thanks to all authors for creating a page that has been read 846,515 times.

      Reader Success Stories

      • How.com.vn English: Rakesh Tare

        Rakesh Tare

        Jun 22, 2017

        "Awesome post buddy. Great work, thanks!"
      Share your story

      Is this article up to date?

      ⚠️ Disclaimer:

      Content from Wiki How English language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
      Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.

      Notices:
      • - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
      • - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
      • - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
      • - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.

      Advertisement