Tuesday, October 25, 2005

Setting .JAR File Association

Normally, the installation program for the Java 2 Runtime Environment will register a default file association so that .JAR files will execute with 'JAVAW -JAR' by double-clicking any .JAR file. If this does not happen, or it somehow gets changed, then manually setting the association for *.JAR files may be needed.
  • Open the Windows Explorer, from the Tools select 'Folder Options...'
  • Click the File Types tab, scroll down and select JAR File type.
  • Press the Advanced button.
  • In the Edit File Type dialog box, select open in Actions box and click Edit...
  • Press the Browse button and navigate to the location the Java interpreter javaw.exe.
  • In the Application used to perform action field, needs to display something similar to "C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe" -jar "%1" %* (Note: the part highlighted in blue is the important part execution string, the other part of the path name can vary depending on which version of Java you're using) then press the OK buttons until all the dialogs are closed.
Now you should be able to launch any *.JAR program by double-clicking it.