Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
up vote 0 down vote accepted

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. ;-)

share|improve this answer
    
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
  http://mindprod.com/jgloss/jar.html#ASSOCIATION

share|improve this answer
    
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.

share|improve this answer

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

HKEY_CLASSES_ROOT\jar_auto_file\shell\open\command

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.

Cheers

Bob Qwack

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .