How to run a jar file

Written by andrew mcclain
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to run a jar file
JAR files contain other compressed files. Run them with programs like WinZip. (ANSI image by DBX 60 from Fotolia.com)

JAR files are actually a collection of files compressed to a smaller size, making it easier to send files over e-mail or to save them to a disk. The JAR file itself is essentially a container for the actual compressed data files. Any program that opens compressed files (like .zip files) will open JAR files. However, you can also run JAR files with the Java Archive Tool, which is part of the Java Developer Kit. The tool does not have a user interface. You type in commands at the command line to get to the compressed files contained within.

Skill level:
Easy

Other People Are Reading

Things you need

  • Java Developer Kit
  • Winzip or other compression program

Show MoreHide

Instructions

  1. 1

    Right-click on the JAR file. A menu opens.

  2. 2

    Choose WinZip (or other compression program listed in the menu). The file opens.

  3. 3

    Choose "Open With . . ." if you do not see your compression program listed in the menu. Windows opens the Open With dialogue.

  4. 4

    Choose the compression program from the list.

  5. 5

    Click "OK."

  1. 1

    Select "Start" (in Windows 7 machines). The Start menu expands.

  2. 2

    Type "cmd" in the Search programs and files field. The command line interface opens.

  3. 3

    Type "jar xf jar-file [archived-file(s)]" (without the quotes). In this statement, replace jar-file with the name of the JAR files that contain the data to be extracted. Enter the path to the JAR file if it is in a different directory. To extract individual files, replace [archived-file(s)] with the name (or names) of the files you want to extract from the archive. If you enter nothing, the command extracts all files.

Tips and warnings

  • When you enter individual files into the command, make certain there is a space between individual files.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.