How to run a JAR file on Windows?

How to run a JAR file on Windows ?

Hey NehaGupta,

The easiest route is probably upgrading or reinstalling the Java Runtime Environment (JRE).

Alternatively, you can try this:

  1. Open Windows Explorer and select ‘Folder Options…’ from the Tools menu.
  2. Click the File Types tab, scroll down, and select the JAR file type.
  3. Press the Advanced button.
  4. In the Edit File Type dialog box, select open in the Actions box and click Edit…
  5. Press the Browse button and navigate to the location of the Java interpreter javaw.exe.
  6. The Application used to perform action field should display something like:
    C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe -jar "%1" %
    
    (Note: the part starting with ‘javaw’ must be exactly like that; the rest of the path may vary depending on the Java version you are using.)
  7. Press OK until all the dialogs are closed.

Dear Nehagupta,

The easiest route is probably upgrading or reinstalling the Java Runtime Environment (JRE).

Alternatively, you can right-click any .jar file, select “Open with,” and choose “Java Runtime Environment.”