How to Open a JAR File on Windows 10

A JAR file is a Java program, so Windows 10 needs Java to run it. Install the free Microsoft Build of OpenJDK and turn on its option to associate .jar files. Then double-click the JAR, or run java -jar with the file name in Command Prompt.

Applies to: Windows 10. Checked against Microsoft Learn on September 28, 2026.

Only open JAR files you trust

A JAR file is an app. Like any app, it can harm your PC if it comes from a bad source. Only run JARs from people or sites you trust.

Install Java

  1. Install the Microsoft Build of OpenJDK. See how to install the JDK on Windows 10.
  2. In the installer, keep the options that add Java to your PATH and associate .jar files turned on.

Run the JAR file

Double-click it. If Java is set up, the program opens. Programs with a window work best this way.

Or use Command Prompt. This works for every JAR and shows any messages:

  1. In File Explorer, open the folder with the JAR file.
  2. Click the address bar, type cmd, and press Enter. Command Prompt opens in that folder.
  3. Type java -jar followed by the file name, and press Enter.
Command Prompt running java -jar with a file name and showing the program's output
Type java -jar and the file name (1), then read the program’s output (2).

If double-clicking doesn’t work

  1. Right-click the JAR file and select Open with > Choose another app.
  2. Select OpenJDK Platform binary, check Always use this app to open .jar files, and select OK.
How do you want to open this file window with OpenJDK Platform binary selected and the Always use this app box checked
Select OpenJDK Platform binary (1), check Always use this app (2), then select OK.

If you can’t see the .jar ending, see how to show file extensions in Windows 10.

See what’s inside a JAR file

A JAR file is a ZIP file inside. Make a copy, change the copy’s ending from .jar to .zip, and open it in File Explorer to see the files.

Frequently asked questions

Is Java the same as JavaScript?

No. JAR files need Java. JavaScript is different and runs in your browser. If a website says JavaScript is turned off, see how to enable JavaScript on Windows 11.

What if it says the JAR needs a newer Java?

Install a newer version, such as OpenJDK 21 or 25, and try again.

If you only need Java to run programs, see how to get Java for Windows 10.

Microsoft’s reference is Install the Microsoft Build of OpenJDK. More help is on our Windows Help & Guides page.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy