Executing a Jar on Vista with a double click

You can do it from the command line with 2 utilities.

The first one, ASSOC, is used to create a file association. To verify if there is one defined for JAR type :

>assoc .jar
.jar=jarfile

If not found then create it with :

>assoc .jar=jarfile

The next step is to define the association. This is done with FTYPE.

To verify if one is already defined , type

>ftype jarfile
jarfile="C:\Program Files\Java\jre1.5.0_10\bin\javaw.exe" -jar "%1" %*

Again if not found or the wrong JRE is used, use FTYPE to fix the problem

>ftype jarfile="C:\Program Files\Java\jre1.5.0_10\bin\javaw.exe" -jar "%1" %*

Leave a Comment