How to Run .JAR Files on Windows 10

If you find yourself unable to open .jar files on Windows 10, it is likely due to one of the following problems:

*The Java Run-Time Environment is not properly set to run .jar files
*Windows Registry is not calling JRE (Java Runtime Environment) properly

Luckily there are a couple of easy solutions for fixing this. What happens for most people is that when trying to open a .jar file, Windows will typically ask what program you want to use to run the program. Of course, most people would simply choose the Java.exe, but this has the problem of stripping –jar from the program’s execution path. Basically you cannot set the required complex command to open .jar files by using “Open With…” in Windows 10.

So what will normally happen is that you’ll associate the .jar file to open with java.exe, you double-click on the executable .jar, and a command prompt window will open for a split second and close, and the program does not launch.

What we need to do is re-associate the .jar file with the Java binary.

  1. Make sure you are updated with the latest Java Runtime Environment.
  2. Navigate to your Java installation folder, go inside the /bin/ folder, right-click on Java.exe and set it to “Run as Administrator”.
  3. Press Windows + X keys and select “Command Prompt (Admin)” or Powershell (Admin) and type cmd
  4. Type the following commands into the prompt (replace the C:\Program Files\etc with your actual Java installation folder, for example, C:\Program Files (x86)\Java\jre1.8.0_131\bin\java.exe):

ftype jarfileterm=cmd /s /k “”C:\Program Files\Java\jre7\bin\java.exe” -jar “%1″ %*”
assoc .jar=jarfileterm
 

Or if you want the command prompt to stay open after launching the .jar file (for debugging purposes)

ftype jarfileterm=cmd /s /k “”C:\Program Files\Java\jre7\bin\java.exe” -jar “%1″ %*”
assoc .jar=jarfileterm
 

Now try to launch the .jar file. Depending on which of the steps above you took, the java executable should either launch or launch with a persistent command prompt behind it (which will fill up with Java calls from the app, useful for debugging purposes).

However, if the steps did not work, we will need to tweak your registry.

  1. Right-click on your Start button and do a search for “regedit”, then open it.
  2. Now expand the HKEY_CLASSES_ROOT folder, and scroll down until you find the folders “jar_auto_file” and “jarfileterm”.
  3. Expand to the following path
    jar_auto_file > Shell > Open > Command
  4. You will see a key named “Default”. Right-click on “Default” and choose “Modify”.
  5. Now in the “Value data” box, paste the ftype command you entered earlier in the command prompt, so it looks like the screenshot below, and press OK.
  6. Now do the same thing for the jarfileterm folder (expand jarfileterm > Shell > Open > Comand).
  7. Now exit regedit and launch your .jar file, it should open properly now!
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Run .JAR Files on Windows 10

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested