File Association

Jar (Java ARchive) is a form of Java executable program. On Win32 systems the Java 2 Runtime Environment's installation program will register a default association for Jar files so that double-clicking a Jar file on the desktop will automatically run it with javaw -jar. Dependent extensions bundled with the application will also be loaded automatically. This feature makes the end-user runtime environment easier to use on Win32 systems.

The Solaris 2.6 kernel has already been extended to recognize the special "magic" number that identifies a Jar file, and to invoke java -jar on such a Jar file as if it were a native Solaris executable. An application packaged in a Jar file can thus be executed directly from the command line or by clicking an icon on the CDE desktop.

In case if a Jar file does not run by double-clicking, you can associate the .jar file extension with Java interpreter to make it executable by clicking.

Here is how to associate files with .jar extension to the Java interpreter, java or javaw, in Windows environment.

  1. In Windows File Explorer, select Tools->Folder Options...

  2. Click File Types tab and select JAR Executable Jar File option. Click Advanced or Change.

  3. In the Edit File Type dialog box, select open in Actions box and click Edit...

  4. If you have JRE 1.3 installed on your machine, the interpreter java or javaw is usually found at C:\Program Files\JavaSoft\JRE\1.3.1\bin. Type C:\Program Files\JavaSoft\JRE\1.3.1\bin\javaw.exe -jar %1 in Application used to perform action field and click OK.

  5. Done. You now can launch .jar program by double-clicking it.