Windows 10 Jar files wont open

Saul9868

New Member
Joined
May 27, 2019
As the title says. I've tried reinstalling java and updating windows but they didnt work, All .jars simply wont open.
 
If the jar is a "console app" it may not actually show anything since there is no GUI.

One option would be to add a protocol handler for JAR files. This is something Oracle doesn't do, but the registry keys would look like what is below *****JAVA PROTOCOL *****
The two bold items would need to be changed to match your java version and save everything below *****JAVA PROTOCOL ***** save to a .reg file and double click it to import.

By default though Java should add the following registry values which also should allow jars to be executed.
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.jar]
@="jarfile"

[HKEY_CLASSES_ROOT\jarfile]
@="Executable Jar File"

[HKEY_CLASSES_ROOT\jarfile\shell]

[HKEY_CLASSES_ROOT\jarfile\shell\open]

[HKEY_CLASSES_ROOT\jarfile\shell\open\command]
@="\"C:\\Program Files (x86)\\Java\\jre1.8.0_211\\bin\\javaw.exe\" -jar \"%1\" %*"



*****JAVA PROTOCOL *****
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\JAVA.URI.JAR]

[HKEY_CLASSES_ROOT\JAVA.URI.JAR\shell]

[HKEY_CLASSES_ROOT\JAVA.URI.JAR\shell\open]

[HKEY_CLASSES_ROOT\JAVA.URI.JAR\shell\open\command]
@="\"C:\\Program Files (x86)\\Java\\jre1.8.0_211\\bin\\javaw.exe\" -jar \"%1\" %*"

[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"JarFile"="Software\\JavaSoft\\Capabilities"

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Capabilities]
"ApplicationName"="Java.Jar"
"ApplicationDescription"="Java jar runtime"
"ApplicationIcon"="\"C:\\Program Files (x86)\\Java\\jre1.8.0_211\\bin\\javaw.exe\""

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Capabilities\FileAssociations]

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Capabilities\URLAssociations]
"javajar"="JAVA.URI.JAR"
 
As the title says. I've tried reinstalling java and updating windows but they didnt work, All .jars simply wont open.

Create a .bat file

You can run jar files on Windows 10 by using this simple workaround. This solution requires you to create a .bat file and use it every time you want to run a specific jar file. The process is rather simple and you can do it by following these steps:

  1. Locate your jar file. In the same folder, create a new Notepad file. To do that, right-click empty space in the directory and choose New > Text Document.
  2. When Notepad opens, enter java -jar filename.jar. Be sure to replace filename.jar with the actual name of the file.
  3. Navigate to the File > Save as.
  4. Set Save as type to All files. Now, enter the desired name for the file. Keep in mind that you need to have .bat as an extension or else the solution won’t work. Save the file in the same location where your jar file is located.
After doing that, locate your .bat file and double-click it. Your jar file will now open. Keep in mind that you need to repeat this process for every jar file that you want to run on your PC or cloud desktop. In addition, be sure to save the .bat file in the same location as your jar file.

OR

Set file association

  1. Open the Settings app. Navigate to the System > Default apps.
  2. Scroll all the way down and select Choose default apps by file type.
  3. Locate the .jar file type and choose a default application.
This method offers limited options and you can only choose applications recognized by Windows 10. Fortunately, there’s another method that you can try. To change file associations, do the following:
  1. Press Windows Key + X to open Win + X menu and choose Control Panel from the list.
  2. When Control Panel opens, select Default Programs.
  3. Click on Associate a file type or protocol with a program.
  4. Locate the .jar file on the list and double-click it.
  5. A list of suggested applications will appear. Click on More apps.
  6. Scroll all the way down and choose Look for another app on this PC.
  7. Locate the javaw.exe file. By default, the application should be located in Program Files folder. Select the application and choose it as a default for .jar files.
  8. Optional: Some users recommend changing the parameters of javaw.exe. To do that, simply locate the file and create its shortcut. Right-click it and navigate to the Properties. Now, locate the Target file and add -jar “%1” % . Be sure to select this newly created shortcut in Step 7.
You can also change file association by right clicking the jar file and choosing Open With > Choose another app. After doing that, follow the steps 5 to 8 from the above.



Regards,
Adrian
 
Easy Ways To Open Jar File in Windows


Procedure 1: Running Jar Files

If you want to run the JAR file, the foremost thing you need to ensure is that Java Runtime Environment is installed in your computer. In case you do not have this program installed in your computer, you need to download the latest Java Runtime Environment from this link https://www.java.com/en/download/ . Once you are done with downloading and installing the Java Runtime Environment, double click on the JAR file to open it. In case the file does not open by double clicking on it, you need to right click on the JAR file and select “open with” and from the list of programs, select “Java Runtime Environment” and check “Always choose this app to open jar file” and select “ok”. This should always open the JAR files by the Java Runtime Environment as default by double clicking on any JAR file.


Procedure 2: Decompressing the Jar File

Decompressing the JAR file is as simple as opening a ZIP file. It is a non-executable process where you can only view the content of the JAR file. There are many software that can decompress the JAR file namely “WinRAR”, “7-ZIP”, “JarX”, and you can download any of these from the internet. Once you have a decompressing program in your computer,

For More : can't open jar files windows 10
 
Back
Top Bottom