Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I recently chose cmd.exe as a default program for .jar files with instant regret.

How do I associate this back again with javaw.exe in the JRE? The default program check box is disabled, so selecting it again doesn't warrant a long term result.

I am using Windows 7. I'd appreciate your suggestions.

share|improve this question
up vote 2 down vote accepted

Get Default Programs Editor

  1. Start the program and click 'File Type settings'
  2. Click 'Context Menu'
  3. Select .jar from the list
  4. On the context menu page, select 'Open' or whatever the default is. You can either delete it and add a new item called "open", or just click Edit
  5. On the item page (either by adding or editing an item) browse to javaw.exe. It's in C:\Program Files (x86)\Java\jre6\bin (or, if you're running 32bit, without the "(x86)" part.
  6. Make sure the parameters look like this: "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
  7. Then save it, of course.

Like this: Default Programs Editor - Select 'open' for .jar files

Default Programs Editor - Set path to javaw.exe

share|improve this answer
+1 This looks like a very nice prove of concept :-) – Ivo Flipse Oct 27 '10 at 0:44
YES, fantastic! Thank you very much Factor Mystic, problem solved :) – braedy. Oct 27 '10 at 7:02

Instructions from following link (especially Method 1 & 2) might help:

share|improve this answer
Again, this doesn't apply for Windows 7; but thanks anyway; I tried all of the methods on the pages, including some of the third-party software - no such luck. – braedy. Oct 27 '10 at 7:02

you could use assoc and ftype internal cmd.exe commands for that purpose

assoc .jar=jarfile
ftype jarfile="c:\program files (x86)\java\jre6\bin\javaw.exe" -jar "%*"

assoc associates an extension with a file type, and ftype sets the default program to open that file type with

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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