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 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.
- Open Command Prompt.
- Run the following command.
- 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
- Visit the official Java website.
- Click the Download button, and then click the Agree and Download button.
- Run the EXE file that downloads and it will install Java.
- When the installation completes, you will see a message telling you it was successfully installed.
- To verify the installation, open Command Prompt and run the following command. It will return the version of Java that’s installed.
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.
- Right-click the JAR file and select Open With… from the context menu.
- From the menu that opens, select Java(TM) Platform SE binary.
- Check the ‘Always use this app to open .jar files’.
- 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.
- Open the Settings app.
- Go to the Apps group of settings.
- Select the Default Apps tab.
- Scroll to the bottom, and click Choose default apps by file type.
- Scroll down the list of extensions and find .JAR.
- Click the plus button.
- In the window that opens, select Java(TM) Platform SE binary.
- 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.
- Open Command Prompt. You do not need admin rights.
- Find the complete path to the JAR file that you want to open.
- 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.
- 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.
- 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.
- 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.
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.