Tuesday, December 7, 2010

Open .jar files with java on double click

If you have installed only the java SE JDK you will not be able to open .jar file by just double clicking it. You can set the executable file my selecting “open with” option on the shortcut menu item. You need to create a .cmd file in the java bin folder ex: “D:\Program Files\Java\jdk1.6.0_21\bin” as java.cmd edit the file in notepad and add the below commands

javaw.exe -jar %1
exit

select java.cmd file as the always open with for .jar file.

No comments: