Unable to Open Jar Files on Windows? Here’s the Fix!

JAR files not opening on Windows 11 or 10? We’ve got you covered. JAR stands for Java Archive File, extended from the ZIP file format. Similar to ZIP, Jar is also a package file format that aggregates multiple files into one. Both ZIP and JAR file extensions are useful for lossless data compression, archiving, and decompressing.

jar-files

Image source: Stack Overflow

So, if you’re unable to open JAR files on Windows, this post lists a few workarounds that you can use for fixing the issue.

Before we proceed and fix the “Cannot open JAR files” issue on Windows, let’s get a quick understanding of what JAR files are and how they are created.

Also read: Discord Fatal Javascript Error? Fixed in Quick & Simple Steps

What are JAR Files?

A majority of websites use JAR files to offer certain functionality based on JAVA applications like add-ons, extensions, or games. JAR files are executed using the JAVA Runtime Environment (JRE) tool. Here are a few key features of the JAR file extension that will allow you to understand its significance:

  • Cross-platform support.
  • A single format that handles class files, audio files as well as image files.
  • Improved download time.
  • One of the best file formats to deploy JAVA applets.

A JAR file typically contains multiple files in a compressed version of .class files, audio files, image files, and other directories. Also, sharing JAR files across a network or different environments is quite easier compared to ZIP.

How to Fix the “Cannot Open JAR Files on Windows” Issue?

#1 Update JAVA Runtime Environment

If your device is operating on an outdated version of the JAVA Runtime Environment, you may run into certain issues while accessing JAR files on Windows. To update JRE to its latest version, follow these steps:

Tap on the Windows icon placed on the Taskbar, open Settings. Select “Apps”.

system

Scroll down through the list of apps and programs, locate Java from the list. Tap on it and hit the “Uninstall” button.

Now, open any preferred web browser and visit Java’s official webpage.

Hit the “Agree and start free download” button to begin the installation process.

Once the installation file has been downloaded on your device, right-click on it and select the “Run as Administrator” option to install Java Runtime Environment.

Tap on “Install” to proceed.

welcome-to-java

And that’s it, fellas!

Updating the JAVA Runtime Environment package will most probably fix the issue. If you’re still not able to access JAR files on Windows, you can try the below-listed solutions.

Also read: How To Enable JavaScript In Web Browsers

#2 Set JRE as Default App

Right-click on the JAR file, select Open with> Choose another app.

Browse through the list of applications, tap on the “More apps” option.

more-apps

Tap on “Look for another app on this PC”.

always-use-this-app

You will now be redirected to the “Program Files” folder. Tap on the JAVA folder and then locate the Java.exe file.

java-exe

Select “Java.exe” to set it as the default application to open JAR files.

#3 Create a .BAT File

Another effective hack to fix the “Cannot open JAR files” issue on Windows is by changing the extension of the JAR to the .bat file. Here’s what you need to do.

Navigate to the folder location where the JAR file is stored on your device. Right-click anywhere and select New> Text Document.

text-document

In the Notepad, type the following command:

notepad

java -jar filename.jar

NOTE: Replace the filename with the original JAR file’s name. For example, if the name of the JAR file is Helloworld.Jar, then type java -jar helloworld.jar in Notepad.

save-as

Save the file with the .bat extension at the same location or folder that contains the original JAR file.

click-save

#4 Run the JAR File on Command Prompt

You can also use Command Prompt to run the JAR file. Follow these quick steps:

Launch Command Prompt in admin mode.

Type “Cd/” and hit Enter.

Now type the following command:

admin

Java -jar filename.jar and hit Enter. Replace the filename with the original JAR file’s name.

Also read: Ways to Protect Against JavaScript Ransomware

Conclusion

Was this post helpful? Did the above-mentioned hacks help you in fixing the “Cannot open JAR files” on Windows issue? If you frequently use JAVA applications on your device, then not being able to access JAR files can be a nightmare.

You can use any of these solutions to get past this issue. Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe Now & Never Miss The Latest Tech Updates!

Enter your e-mail address and click the Subscribe button to receive great content and coupon codes for amazing discounts.

Don't Miss Out. Complete the subscription Now.