Politecnico di Torino

Software Engineering Group

 
 

Making Jar Files Double Clickable

In Windows 95/98/ME/NT/2000 you can set up the extension *.jar so that when you double click on a jar file in the disk explorer it will start executing the main-class of the jar.
  1. Click Start | Disk Explorer | View | Options | File Types | Executable Jar file | edit.
  2. If there is no Executable Jar file entry click new to create one and fill in the Description of type to jar - Java executable.
  3. Change the name of the entry from Executable Jar file to something that will sort where you expect it like jar - Java executable.
  4. Change the content type to the proper MIME type.
  5. Set default extension for Content type to .jar.
  6. Click open | edit .
  7. If there is no open, Click new and set the action to open.
  8. Set the application to perform to: "C:\program files\JavaSoft\JRE\1.4.0_01\bin\javaw.exe" -jar "%1". You can browse or adjust as necessary to account for where you put your javaw.exe
  9. Uncheck DDE.
  10. Click OK.
  11. Click new and set the action to execute.
  12. Set the application to perform to: "C:\program files\JavaSoft\JRE\1.4.0_01\bin\javaw.exe" -jar "%1". You can browse or adjust as necessary to account for where you put your javaw.exe
  13. Uncheck DDE.
  14. Click OK.
  15. Click new and set the action to edit.
  16. Set the application to perform to: "D:\program files\WinZip\winzip32.exe" "%1" . You can browse or adjust as necessary to account for where you put your Winzip program.
  17. Uncheck DDE.
  18. Click OK.
  19. Click execute | set default.
  20. Click always show extension.
  21. click change icon. Choose a nice icon. 
  22. click close.
  23. Write a letter to Microsoft asking them to automate this mess! :-)