1. Home
  2. Windows Tips
  3. Jar file

How to open Jar files on Windows 10 [TUTORIAL]

Java based-apps were once common on the Windows platform. They weren’t the greatest since Java apps were heavy on the system but not many alternatives were available. Java apps are still around though not as abundant as they used to be. One of the most popular Java apps is the Java version of Minecraft which outshines the Bedrock/UWP version in many areas.

If you have a Jar file, it’s basically a Java file and you need the runtime to open it.

Java files

Java is used by a lot of apps however, that doesn’t mean you will always be running JAR files when you run a Java-based app.  You may still be opening an EXE file. That said, you can still find a purely Java-based file.

With Java files, you may encounter either the JAR or the JRE file extension. Both can be run the same way but you will have to install the Java runtime on your system. It is possible that it is already installed and you do not have the right version to run the Java file on your system.

Check for Java Runtime

Before you can open a JRE or JAR file on Windows 10, you need to check if you have the Java runtime installed on your system.

  1. Open Command Prompt.
  2. Run the following command.
java -version
  1. If the command returns ‘java’ is not recognized as an internal or external command,
    operable program or batch file.’, that means you do not have Java installed on your system.

How to Run a Jar file on Windows 10

Now that we’ve determined if you have Java on your system or not, we can get down to opening a JAR file. The first step is to install Java.

Install Java runtime

  1. Visit the official Java website.
  2. Click the Download button, and then click the Agree and Download button.
  3. Run the EXE file that downloads and it will install Java.
  4. When the installation completes, you will see a message telling you it was successfully installed.
  5. To verify the installation, open Command Prompt and run the following command. It will return the version of Java that’s installed.
java -version

1. How to Open JAR files – Open With

After installing the Java runtime, the icon of the JAR file should automatically change to show it is associated with Java. You can double-click the file and open. If the file doesn’t open, or the icon isn’t updated, follow the steps below.

  1. Right-click the JAR file and select Open With… from the context menu.
  2. From the menu that opens, select Java(TM) Platform SE binary.
  3. Check the ‘Always use this app to open .jar files’.
  4. The icon for the JAR file will be updated and for all JAR files on your system, you can now double-click and open them.

2. How to Open JAR files – Settings app

The Open With context menu option sometimes fails to associate files with their default apps. If you’re unable to open a JAR file by double-clicking it after using the first method, try the following.

  1. Open the Settings app.
  2. Go to the Apps group of settings.
  3. Select the Default Apps tab.
  4. Scroll to the bottom, and click Choose default apps by file type.
  5. Scroll down the list of extensions and find .JAR.
  6. Click the plus button.
  7. In the window that opens, select Java(TM) Platform SE binary.
  8. While you’re at it, you might want to do the same for all the other Java file formats listed.

3. Open JAR file – Command Prompt

JAR files can be opened from the Command Prompt.

  1. Open Command Prompt. You do not need admin rights.
  2. Find the complete path to the JAR file that you want to open.
  3. Use the following command to open the file.
java -jar complete path to file

Troubleshoot JAR files

Java has been around for a long time and it continues to update to this day.That said, it still hasn’t overcome all the problems it had in its earlier years which is why you may run into some trouble when you try to open a JAR file.

  1. Make sure Java is allowed to run on your system and that Windows Defender has not blocked it. If it flags a JAR file, and you know it is safe, allow the file on your system.
  2. You should check the version of Java because version compatibility is sometimes an issue. If the JAR file hasn’t been updated to run on the latest version of Java, you will have to downgrade it to the right one.
  3. If a file says it needs Java to run, but it downloads as a ZIP or RAR, you will have to extract it before you can open it.

Conclusion

Java isn’t as common as it once was. Opening JAR, JAVA, and JRE files wasn’t this complicated when knowledge of the platform was more common but it has become somewhat obscure. Some apps that rely on Java often include files that will allow the app to run without installing the official run time making it hard to tell that it is using Java.