How to run .jar files on windows 10?

how to run .jar files on windows 10

Java Archive files are JAR files. The package combines Java files and metadata into a single file. You’ve come to the right place if you’re looking to open a JAR file in Windows 10. We will explain what JAR files contain and how to open them.

JAR files can also cause errors when you attempt to open them. In this guide, we show you how to run .jar files on windows 10.

What is a JAR file?

Java Archive files are abbreviated as a JAR. It is an archive file. The archive file is a single file that contains other files that are bundled together in order to decrease storage space, error rates, and other factors. The only difference is that Java Runtime Environment accesses them. They are very much like ZIP files.

A JAR file’s manifest is its unique feature. JAR manifests contain information about the files inside the file, such as compiled Java code, also known as CLASS files, security certificates, image files, audio files, etc.

The JAR file can be read and run as a single request in the Runtime Environment. It could be a browser add-on, a game, an application theme, etc. You can use it both on desktop and mobile. Its compressed format allows you to move and share thousands of files easily.

How to run .JAR files on Windows 10

In order to run the application/code inside a jar file, you need the Java Runtime Environment. The following steps will demonstrate how to check what version of Java is running on your personal computer and how to update it to the latest version:

1. Launch Command Prompt as Administrator using any of the methods listed below.

  • Open the power user menu by pressing Windows key + X or by right-clicking on the start button. Click on Command Prompt (Admin).
  • Enter Ctrl + shift + enter after pressing Windows key + R to launch the Run command.
  • Select the Run as Administrator option on the right panel after clicking the Start button (or pressing the Windows key and S).

2. Then, type the java -version at the command prompt.

You will now be able to see the exact version of Java installed on your system via the command prompt. To retrieve the java version, search for the configured java application on your PC and click on About in the general tab.

3. Java 8 Update 251 is the latest version (as of 14th April 2020). You can download Java by heading over to Java Downloads for All Operating Systems and clicking on the “Agree and Start Free Download” button if you don’t have the latest version or don’t have Java at all.

4. Download the file (This PC > Downloads) and double-click on the .exe file to open the setup wizard. Install Java by following the on-screen instructions.

5. Make sure the update was successfully installed by repeating steps 1 and 2.

To update java successfully, remove the previous version of java first using the official Java Removal Tool, then perform a fresh installation.

Method 1: How to run .jar files using the ‘Open With’ option?

The first method entails manually opening the jar file with the Java Runtime Environment. To do this, follow these instructions.

  • Find the jar file you would like to execute/open in the file explorer (Windows key + E) and right-click it.
  • Choose Open With from the file options/context menu.
  • Locate the Java(TM) Platform SE binary in the list of applications. There is a high probability that you won’t find it in the list of applications.
  • To select another app, click on it.
  • If you cannot find the application, click on More Apps > Look for another app on this PC to manually locate it.
  • Go to the location where java.exe is stored. For most users, it should be C:\Program Files\Java\jre1.8.0_221\bin but if you do not find it there, try going down the following path C:\Program Files (x86)\Java\jre1.8.0_221\bin
  • Finally, choose java.exe and click enter.

Method 2: How to run .jar files using the Command Prompt?

Jar files can also be run via the Windows 10 command prompt. One command line is all that is required to complete the process.

  • Use any of the methods listed above to launch Command Prompt as Administrator.
  • After the command prompt window has opened, run the command ‘cd /’ to return to the top of the directory.
  • Enter the following command: java -jar sample.jar.

In the command line, replace ‘sample.jar’ with the name of the .jar file.

The second step can be skipped by replacing sample.jar with the complete path of the jar file.

Method 3: Ho to run .jar files using third-party applications?

Similar to other applications, there are several third-party applications for running and executing jar files on Windows 10.Jarx is a jar executor program that is very popular on the internet.

Visit Jarx – The JAR executer and download the software file by clicking on ‘Jarx-1.2-installer.exe’. Extract Jarx to your hard drive and install it. This application does not have a GUI except for an about window. Double-click the jar file or right-click and select open to run jar files on your computer.

Jarfix is another third-party application that can help you run jar files. To run jar files, use the same procedure as Jarx.

jarfix can only run .jar files when launched as an administrator.

Method 4: How to run .jar files using extract?

There are some jar files that are not designed to be executables. There are some that just serve as packages for holding other types of files. We can check whether a jar file is executable by simply unpacking/extracting it.

You likely already know how to extract files if you have worked with zip and rar files. There are multiple file extraction applications available on the internet, or you can use the built-in extraction tool in Windows. 7-zip and WinRAR are among the most widely used and trusted applications.

Windows’ in-built extractor can be used to extract jar files by right-clicking on them and selecting ‘Extract’.

You must first download the installation file from the application’s website before you can extract a file using a third-party application. When you are finished installing the application, open the jar file to see the content it contains.

Make sure the file extension is .jar

There is a possibility that an incorrect file extension can result in the Jar file not opening in Windows 10. To check it, follow these steps:

  • Navigate to the problematic Jar file by pressing Win + E.
  • Select the File name extensions checkbox on the View tab.
  • Ensure the Jar file has a .jar extension. If you don’t have the extension .jar, you can change it to .jar and save it. Then you can try opening it and see if the Jar file, not the opening problem is resolved.

Some Frequently Asked Questions By Users

1. Can’t I open my JAR file?

If you can’t open it after updating or reinstalling your Java Runtime Environment, perhaps that file isn’t meant for you to open or manipulate.

2. Can JAR files be executed?

Some JAR files cannot be executed. However, some often contain runnable software or source code that can be executed.

3. JAR files differ from executable JAR files in what way?

In JAR files, you’ll find compiled Java classes while in executable JAR files, you’ll find Main classes.

4. Manifest files are part of a JAR. What are they?

MANIFEST is the manifest file in JAR and can be found under the META-INF directory. Essentially, it consists of a list of pairs of keys and values, grouped into sections called attributes or headers.

You can also read


Please enter your comment!
Please enter your name here