If you doubleclick on a jar file, and your Java application does not start, your .jar association has been hijacked. You can fix the problem with Jarfix.
The problem ...
The root cause for the problem above is, that a program has stolen the .jar association. If you have installed the Java Runtime Environment the first time, the file type called "jar" is assigned to javaw.exe correctly. "jar" is an abbreviation for "java archive" and javaw.exe is the correct program to execute a .jar. However, on Windows any program can steal a file type at any time even if it is already associated with a program. Many zip/unzip programs prefer to do this, because a jar is stored in the .zip format. If you doubleclick on a .jar, your pack program opens the file, rather than javaw runs the program, because your pack program ignores the meta information which are also stored in a .jar. In the Oracle bug database there is the low-priority report 4912211 "add mechanism to restore hijacked .jar and .jnlp file extensions", but it has been closed as "Closed, Will Not Fix".
The workaround ...
Reinstall the Java Runtime Environment or fix the Windows Registry manually each time this problem occurs.
The solution ...
You can fix this problem very easy with the small but reliable jarfix.exe program. Just doubleclick on it to restore the .jar association with javaw.exe.
By default jarfix fixes the problem without any additional parameters. Nonetheless, there are a few optional parameters available if you want to customize jarfix.
|/64||On Windows x64 you can have both a 32 bit JRE and/or a 64 bit JRE installed. By default jarfix searches for the 32 bit JRE first and if a 32 bit JRE is not found it continues to search for the 64 bit JRE. With the /64 option you tell jarfix to search only for the 64 bit JRE.|
|/a||Option /a adds the menu item called "Run as..." (Windows XP) respectively "Run as administrator" (Windows Vista and Windows 7) to the context menu of the Windows Explorer in order to execute .jar files also with administrator permissions. That can be useful for Java based installers that are stored in the .jar-format, because usually those installers want to write to the Windows program directory where normal users haven't write permissions by default.|
|/c||Reads from the config file jarfix.ini. With that config file you can fully control the action that should happen if you double click on a jar file. The config files must be saved in the same folder as the jarfix.exe file. Options specified on the command line are concatenated with the options specified in the config file. Both detailed instructions and examples can be found in that sample configuration file.|
|/h||prints some help (version, author, syntax) and quits the program|
|/i||sets an alternative icon for .jar files (only necessary for older JREs)|
|/s||runs jarfix silently (without any dialogs). That can be useful if jarfix should be launched by a different program or if you want to run jarfix by the Windows' autostart feature.|
|/u||restores the .jar-association for the current user account only. You can use that option if you don't have admin permissions on the computer. The option can be also useful if you are admin and if you actually want to use a different JRE than all other users on the computer.|
|/x||extracts four files and quits the program. The files which are being extracted are: a) jarfix-license.txt, the license of jarfix; b) jarfix.ini, a sample configuration file for the /c option; c) jartest.jar, a tiny Java programcalled Jartest which you can use in order to test the .jar-association; d) jartest-license.txt, the license of Jartest|
The parameters /64 /a /s and /c can be used together, for example "jarfix /s /a" starts the program without dialogs, fixes the issue silently and adds the menu item called "Run as administrator..." for jar files to the conext menu of the Windows Explorer.
The Jafrix logo is Copyright (C) 2012 by Dipl.-Inf. (FH) Johann Nepomuk
The jarfix logo is composition of the Duke (released under the new BSD license), the jar icon and the patch icon (both adapted from the gnome-harm project that has been released under the CC-BY 3.0). The logo has been created using Gimp.
jarfix is freeware. You can use it on any Windows computer. You don't need to register or pay for jarfix.
Download from the heise server:
Download from the authors' website:jarfix.exe (Mar 11, 2012)
Why should I use jarfix?
If you have started to modify your registry manually and it still doesn't work for you, feel free to use jarfix. jarfix can fix the issue fast, comfortable, complete and correctly. There is no need to touch the registry manually.
It seems it has no effect on my system
Please just follow the instructions below and you should be save.
1) Make sure that you use the latest jarfix release from this website.
2) Start jarfix with admin permissions. If you cannot get admin permission, start jarfix with the option /u
3) If you have started with admin permissions and the issue is still there for an user, start jarfix also under the user account
I have found a jarfix.exe on a
different web site. Which version is it?
The latest jarfix release can be found on http://johann.loefflmann.net/jarfix. Run jarfix /h to get the version or generate a hash of your download and compare the hash with the official jarfix hashes at http://johann.loefflmann.net/downloads/jarfix-hashes.txt
How can I launch jarfix so that the
message dialog does not appear?
have a 64 bit Windows and only installed a 64 bit JRE, how do I
launch jarfix in that case ?
have installed both a 32 bit JRE and a 64 bit JRE on my Windows x64.
How can I use the 64 bit JRE for .jar-files?
How can I fix the issue if I don't have admin permissions ?
I have installed many Java Runtime Environments (JREs)
on my computer, how can I select a specific JRE for .jar files ?
Create a configuration file called jarfix.ini and start jarfix with the option called /c in order to read the configuration file:
How can I
pass options to jarfix ?
There are many ways to do that:
a) Select Start -> Run ... and enter the full path to jarfix.exe including options
b) Start the command prompt cmd.exe and enter the full path to jarfix.exe including options
c) Create a batch and enter the full path to jarfix.exe including options
d) Use the Windows Explorer, create a shortcut from jarfix.exe and modify the properties of the shortcut
Can I use jarfix in a commercial organization?
Can I deploy jarfix.exe with my program (free or commercial)?
Can I put jarfix.exe on my homepage so my users can download it from
Yes, but in my opinion it is smart to add a link to this website so your users can find this website with FAQs, documentation, etc. and also the latest and greatest jarfix.
Do I need to mention your name or your website?
No, but I like it if you do it.
I would like to recommend your site/program, is this ok?
I found a site which claims that jarfix is GPLed.
jarfix is freeware which is different to "free software". Jarfix was never released under the terms of the GPL.
Can I have the sourcecode?
No. Jarfix runs on proprietary Windows only and therefore jarfix has been released as closed source as well.
I have got a message called "The publisher could not be verified.
Are you sure you want to run this software?" What does that mean?
If you download files from the internet to a NTFS formatted partition of your disc, Windows adds so called Alternate Data Stream metadata information to those files. This metadata can only exist on NTFS filesystems and indicates from which Security Zone the file was originally downloaded. If you try to start an executable from there, you will get the warning above; files downloaded from the internet could be dangerous, you know. You can remove the metainfo by copying the file to a non-NTFS filesystem (such as a floppy or an USB stick) and then copying it back over the original file. Stream data is not preserved on FAT or other non-NTFS volumes, so copying the file there strips off the metadata - Security by "specialists", you know ;) At the command prompt you can also remove the the ADS metainfo from the NTFS filesystem - just in case you haven't a FAT formatted volume. In order to verify the integrity of the jarfix binary, I recommend to calculate digital fingerprints and check those with integrity tools like Jacksum. Digests for jarfix are printed at the download section.
March 11, 2012
- support for detecting a 64 bit Java Runtime Environment on 64 bit Windows
- option to search only for a 64 bit JRE if both 32 bit JRE and 64 bit JRE are installed (/64)
- option to fix the issue even without admin permissions (/u)
- option to read from a config file in order to fully control the action that happens if you double click on a jar file (/c)
- option to add the menu item called "Run as..." respectively "Run as administrator" to the context menu of the Windows Explorer in order to execute .jar files under the administrator account (/a)
- option to set an alternative program icon for .jar files (/i)
- option to extract a tiny Java program called jartest and the licenses for both jarfix and jartest (/x)
- the jarfix logo has been used for the program icon
- the title JarFix has been renamed to Jarfix
April 2, 2011
- a small logo for jarfix (homepage only)
March 22, 2010
- jarfix can now fix the jar association even if it has been changed manually by the user
October 26, 2007
- bug fixed: jarfix does not fix the jar association in every case
- added Windows Vista support
October 21, 2006
until today jarfix has been mentioned on the FAQ page only, now jarfix has also a homepage
July 30, 2005
- english and german dialogs
- checks whether a JRE is available, if not it asks the user whether the user want to download a JRE
- determines the latest version of any installed JRE
- restores the .jar association with javaw.exe
- sets a Java icon for the .jar files
June 1, 2003
jarfix.reg has been published in the NumericalChameleon 1.5.0 package.
May 1, 2002
Before jarfix.exe went live, I have pubished the jarfix.reg on my homepage.