Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

3 Answers 3

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:

http://www.mydigitallife.info/2008/06/20/how-to-edit-or-change-file-type-or-extension-associations-default-programs-in-windows-vista/

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

 
discard

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.