If you can't open .jar files in Windows 10, it is likely due to one of the following issues:
* The Java runtime environment is not configured correctly to run .jar files
* The Windows registry does not call the JRE (Java Runtime Environment) correctly
Fortunately, there are a couple of easy solutions to fix this problem. What happens for most people is that when you try to open a .jar file, Windows often asks which program you want to use to run the program. Of course, most people would just choose Java.exe, but this has the problem of removing -jar from the program execution path. Basically, you cannot set the complex command required to open .jar files using “To open with …” in Windows 10.
Then, what will normally happen is that you will associate the .jar file to open it with java.exe, you will double click on the .jar executable and a command prompt window will open for a split second and close, and the program will not launch.
What we have to do is re-associate the .jar file with the Java binary. The steps are simple:
-
Make sure you are up to date with the latest Java runtime environment.
-
Navigate to the Java installation folder, go to folder / bin /, right click Java.exe and set it to “Execute as an administrator”.
-
Press the Windows keys + X and select »Command Prompt (Admin)» o Powershell (Admin) and type cmd
-
Type the following commands at the prompt ( replace C: Program Filesetc with your actual Java installation folder, for example, mine is C: Program Files (x86) Javajre1.8.0_131binjava.exe ):
ftype jarfileterm = cmd / s / k “” C: Program Files Javajre7binjava.exe “-jar”% 1 ″% * “
assoc .jar = jarfileterm
** Or if you want the command prompt to remain open after starting the .jar file (for debugging purposes) **
ftype jarfileterm = cmd / s / k “” C: Program Files Javajre7binjava.exe “-jar”% 1 ″% * “
assoc .jar = jarfileterm
Now try running the .jar file. Depending on the steps above, the java executable must be started or run with a persistent command line behind it (to be completed with Java calls from the application, useful for debugging purposes).
However, if the steps didn't work, we will have to adjust your registration.
-
Right-click on the Start button and search for »regedit«, then open it.
-
Now expand the HKEY_CLASSES_ROOT folder and scroll down until you find the folders »jar_auto_file» and »jarfileterm«.
-
Expand Jar_auto File> Shell> To open> Command.
-
You will see a key named »Default«. Right-click on »Default» and select »Modify«.
-
Now, in the frame “Value information”, paste the ftype command you entered earlier on the command line, so it looks like the screenshot below, and press OK.
-
Now do the same for the jarfileterm folder (expand jarfileterm> Shell> To open> Command).
-
Now quit regedit and run your .jar file, It should open properly now!







