How to Run .JAR Files on Windows 10

Originally published at: 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.…

Try this:
“Reinstall JRE and check if it solves the issue.
Alternatively, you can check out a solution posted on the StackOverflow forums:
“Open the Windows Explorer, from the Tools select ‘Folder Options…’
Click the File Types tab, scroll down and select JAR File type.
Press the Advanced button.
In the Edit File Type dialog box, select open in Actions box and click Edit…
Press the Browse button and navigate to the location the Java interpreter javaw.exe.
In the Application used to perform action field, needs to display something similar to C:Program FilesJavaj2re1.4.2_04binjavaw.exe” -jar “%1” % (Note: the part starting with ‘javaw’ must be exactly like that; the other part of the path name can vary depending on which version of Java you’re using) then press the OK buttons until all the dialogs are closed.”

Try this “Reinstall JRE and check if it solves the issue.
Alternatively, you can check out a solution posted on the StackOverflow forums:
“Open the Windows Explorer, from the Tools select ‘Folder Options…’
Click the File Types tab, scroll down and select JAR File type.
Press the Advanced button.
In the Edit File Type dialog box, select open in Actions box and click Edit…
Press the Browse button and navigate to the location the Java interpreter javaw.exe.
In the Application used to perform action field, needs to display something similar to C:Program FilesJavaj2re1.4.2_04binjavaw.exe” -jar “%1” % (Note: the part starting with ‘javaw’ must be exactly like that; the other part of the path name can vary depending on which version of Java you’re using) then press the OK buttons until all the dialogs are closed.”"

Enter This command “ftype jarfileterm=cmd /s /k “”C:Program FilesJavajre7binjava.exe” -jar “%1″ %*””

I’m running into an issue on step 4, I can’t replace C:Program Filesetc with C:Program Files (x86)Javajre1.8.0_***binjava.exe it tells me Invalid Switch - C:Program and I’ve tried taking out the spaces but that obviously doesn’t work because that’s not the same thing, anyone know what I can do

That powershell trick worked perfectly for me. Thanks!

What do i do if there is no jar_auto_term?

One of my JarFIle cannot change to : Executable Jar File because my file/folder was corrupted!

Do u mean the Java Console Output? that can be done by going into Java Control Panel > Advanced > Java Console > Show Console.

Make sure you are updated with the latest version of Java Runtime Environment:
https://java.com/en/download/
Also, yes you do input the commands there, the prewritten code shouldn’t matter.

You need to replace it with the location of your Java directory. You can do so by opening it and then double-clicking on the address in the top and copying and pasting it.

Reinstall JRE and check if it solves the issue.
Alternatively, you can check out a solution posted on the StackOverflow forums:
“Open the Windows Explorer, from the Tools select ‘Folder Options…’
Click the File Types tab, scroll down and select JAR File type.
Press the Advanced button.
In the Edit File Type dialog box, select open in Actions box and click Edit…
Press the Browse button and navigate to the location the Java interpreter javaw.exe.
In the Application used to perform action field, needs to display something similar to C:Program FilesJavaj2re1.4.2_04binjavaw.exe” -jar “%1” % (Note: the part starting with ‘javaw’ must be exactly like that; the other part of the path name can vary depending on which version of Java you’re using) then press the OK buttons until all the dialogs are closed."

is this two seperate commands? I assume it is. and if so which line do I add the to regedit?

even after doing this still not working, and in regedit i dont have jar_auto_file

ftype jarfileterm=cmd /s /k "“C:Program Files (x86)Javajre1.8.0_211binjava.exe”-jar “%1″ %*”
assoc .jar=jarfileterm (this is what you are supposed to paste)

I tried both method still not working unfortunately :frowning: any other suggestion please?