How to Run .Jar File by Double Click on Windows 7 64-Bit

How to run .jar file by double click on Windows 7 64-bit?

What is listed in right-click-> Open With ?
Is some other program listed as the default program ? Is a Java Runtime listed ? If a Java Runtime is listed, you can open with it, and make it the default program to run with.

ie,


Right Click -> Properties -> Change -> C:\Program Files\Java\jre7\bin\javaw.exe

Unable to run .jar files by double-clicking them on Windows 7

I managed to get Java(TM) Platform SE binary (javaw.exe) in the Open with list by matching paths in HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE registry entries:

HKEY_CURRENT_USER\Software\Classes\jar_auto_file\shell\open\command

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\jarfile\shell\open\command

Seems like one of the entries pointed to an older version of Java. Now .jar files are finally showing icons, but still do not work on double-click.


UPDATE: SOLUTION

Delete the .jar and jar_auto_file entries from HKEY_CURRENT_USER/Software/Classes and it should work. .jar files should open on double-click again.

Make sure to backup these entries first by right-clicking the entry and choosing Export.

Additional information can be found on superuser.

I can run .jar files through cmd, but I cannot double click them

I had the same problem, and it turns out that the .jar file association in the registry was broken. The following steps fixed it:

  • Open the Registry Editor, and navigate to HKEY_CLASSES_ROOT\jarfile\shell\open\command, and modify the value of the Default key as follows
  • Replace [Location of your JRE] in "[Location of your JRE]\bin\javaw.exe" -jar "%1" %* with the root directory of your JRE
    installation. For example, "C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*.
  • Repeat the above steps for HKEY_LOCAL_MACHINE\SOFTWARE\Classes\jarfile\shell\open\command.

I have a Windows 7 machine, but I assume this would work for 32-bit environments as well.

EDIT: Fixed the path in the example - it should use the "Program Files" directory and not "Program Files (x86)".

Windows, run JAR with double click

Ok, I solved my issue.
Usually the JAR runs without any problem by simply double clicking it in windows,
in my case it was not running becase the .jar files was associated to the 32bit version of javaw.exe while the code in the JAR was expecting the 64bit environment.
Changing the .jar type association in windows from 32bit to 64bit version of javaw.exe solved the issue

Unable to run executable jar file using double click

Go there and download newest verson of java RE and install it and it should work. But if it does not work you should get some kind of error message and try to google it. It is possible that your java(s) are broken.



Related Topics



Leave a reply



Submit