How can I configure .jar files run on double-click in Windows 7?


Open regedit.exe search for : HKEY_CLASSES_ROOT\jarfile\shell\open\command

Probably, you have in the value:"C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %* change it to "C:\Program Files\Java\jre7\bin\java.exe" -jar "%1" %*

(make sure that the path points to your actual java.exe, for it depends on the java version you have installed)

Good luck. It worked for me. ;-)

  • Actually it's not necessary to use javaw. java.exe is ok for me. But the whole command was missing. – user626528 Jun 7 '13 at 6:05

Instructions for configuring the file assocations you'll need can be found here:

  jar : Java Glossary - Making Jar Files Double Clickable

  • Buy a tool for this? You must be kidding. – user626528 Jun 7 '13 at 6:06

What I did was to make a shortcut to the jar file and edit it to open "java -jar path/to/file.jar". It's the only workaround I have come up with.


In Windows 7 64 you might also find the 32bit registry key:


This key might be set to 32bit values ( "C:\Program Files\Java\jre7\bin\java.exe" -jar "%1" or alike) creating conflict with 64 bit version thus the issue, so adjust it to this value:

"C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*

You should be good to go with double-clicking executable jar files without conflict, now.


Bob Qwack

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.