I have a JAR file named helloworld.jar. In order to run it, I\'m executing the following command in a command-line window:
In Windows XP * you need just 2 shell commands:
C:\>ftype myjarfile="C:\JRE1.6\bin\javaw.exe" -jar "%1" %*
C:\>assoc .jar=myjarfile
obviously using the correct path for the JRE and any name you want instead of myjarfile
.
To just check the current settings:
C:\>assoc .jar
C:\>ftype jarfile
this time using the value returned by the first command, if any, instead of jarfile
.
* not tested with Windows 7