Fix: Unable to access Jarfile

A JAR is a package file format which is used by many Java class files with the associated metadata and resources to get packed in a single package for distribution. They are built on the ZIP architecture and have a .jar extension.

Unable to access Jarfile
Unable to access Jarfile

Users experience the error “Unable to access Jarfile” when they either try to open a .JAR package or an application prompts them when it fails to launch. This error message is very common and signifies that you do not have handlers for .JAR set correctly.

What causes the error ‘Unable to access Jarfile’?

There are several different reasons why you might experience this error message but most of them are related to the handling of .JAR files on your computer. The reasons for this error are but not limited to:

  • You do not have the latest JAVA version installed on your computer. For the efficient running of JAR files, it is necessary that you have the required latest framework installed on your computer.
  • The default program for opening JAR files is not set.
  • Malware is present on your computer which might be interfering with the entire process.
  • The file path set for the Java executable is not correct and points to a wrong location. This might cause the error message whenever you boot your computer.

Before moving on with the solutions, make sure that you have an active internet connection and administrator account privileges.

Solution 1: Installing Latest Java Update

Like mentioned before, for programs to run JAR files, the proper architecture i.e. Java needs to be installed on your computer. Furthermore, it should be the latest version released for the users. If you don’t have Java installed, you can directly download and install it. If you have an older version, we will first uninstall it and then install the latest one from the official website.

  1. Press Windows + R, type “appwiz.cpl” in the dialogue box and press Enter.
  2. Once in the application manager, search for the entry of Java. Right-click it and select Uninstall.
Uninstalling old Java
Uninstalling old Java – application manager
  1. Once the application is uninstalled, navigate to the official Java website and download the latest one. After downloading the executable, run it to install the latest version of Java.
  2. Restart your computer and check if the error message has been resolved.

Solution 2: Setting the default file association

You might also experience the error message is Java is not set as the default handler for JAR files on your computer. An archiving program might be selected as the default opener of JAR files which might not produce the result which you were expecting. We can try changing the file association and check if this fixes the problem.

  1. Navigate to the directory where the JAR file is located. Right-click it and select Open with and select the Java program.
Opening JAR files with Java
Opening JAR files with Java
  1. If you do not get the option right away to open as Java, you can click Choose another app and from the list, select Java.
  2. If you want to set the default association permanently in your computer for JAR files to be opened by Java, we can do that in the settings.

Press Windows + I to launch the settings. Now navigate to Apps and select Default apps from the left navigation bar.

  1. Now click Choose default apps by file type present at the near bottom. Now locate the entry .jar files and make sure it is selected to be opened by Java.
Changing Default File Association
Changing Default File Association
  1. Save changes and exit. Restart your computer and check if the error message is resolved.

Solution 3: Checking for malware

If you are still getting the error when you start your operating system or any program, you should check if your computer contains any virus or malware. These entities exploit your registry and after modifying several keys, makes jar file unusable.

Scanning using MalwareBytes
Scanning using Malware Bytes

You should run a thorough check on your computer and then follow Solution 1 to make sure all the entries and file associations are deleted and then remade when we reinstall Java. You check our article on How to remove malware using Malwarebytes.

Solution 4: Checking for documentation (for Developers)

Developers also experience this error message when they try to launch JAR files when they are coding with Java or some other language. This can be really troublesome and will probably halt your task at hand.

Java coding error
Java coding error

To diagnose and solve the error, it is recommended that you read the documentation of the function or utility which you are using to open or run JAR files. You might have gotten the file path wrong or maybe passing incorrect parameters to the function. You can easily get demos of the functionality which you are trying to implement in popular coding websites such as Stack Overflow. Identify your mistake and fix it before running the program/function again.

If none of the methods shown above have fixed your problem it’s possible that you are trying to open is corrupted or it needs to be repaired. There are some programs that you can use to repair this file. However, we personally recommend you to use JarFix as it is freeware and you won’t have to pay anything.

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

Fix: Unable to access Jarfile

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested