Changing the default app for JAR files should fix this issue
by Matthew Adams
Matthew is a freelancer who has produced a variety of articles on various topics related to technology. His main focus is the Windows OS and all the things… read more
Updated on
- The Unable to access the JAR file is a standard error when you don’t have compatible software to open it.
- Some users reported that using stable file openers fixed the issue for them.
- You can also fix this issue by uninstalling and downloading the latest version of Java.
Java browser plug-ins might have gone out of fashion, but many programs run off Java. For example, you can open Java programs with JarFiles, among other software for opening JAR files.
However, some Java software users can’t always open JAR programs with the Unable to access JarFile error message popping up. This guide will show you some practical ways to get past this error message.
Why does it say unable to access jar?
The inability to access JarFile on Minecraft or Forge can be caused by mistakes on your path or issues with the software. Below are some of the prevalent causes:
- Outdated Java version: If your Java version is obsolete, you cannot access JarFile using the docker container. You need to update Java to the latest version.
- Wrong default program: Sometimes, this issue might be because you have not set the default program to open the JarFiles. Choosing Java as the default app for opening JAR files should fix this.
- Issues with the JAR file path: If the path to your jar file is incorrect, you can get this error. The solution here is to ensure the path is correct.
How can I fix the unable to access JarFile error?
Before proceeding to the fixes in this guide, try the preliminary troubleshooting steps below:
How we test, review and rate?
We have worked for the past 6 months on building a new review system on how we produce content. Using it, we have subsequently redone most of our articles to provide actual hands-on expertise on the guides we made.
For more details you can read how we test, review, and rate at WindowsReport.
- Add .jar extension to the JAR file name
- Beware of spaces in the JAR file path
- Add quotes to the JAR file path if it contains space
- Move the JAR file to another folder
- Use a file opener software
If the fixes above fail to solve the issue, you can now move to the fixes below:
1. Update your Java version
- Press the Windows key + R, type appwiz.cpl, and click OK.
- Right-click the Java app and select the Uninstall option.
- Now, go to the official website to download the latest version of the Java app.
A broken or outdated app can cause the unable to access the JarFile issue. Downloading the latest version of the app should fix the problem.
2. Select Java as the default program for JarFiles
- Open File Explorer and the folder that includes your JAR file.
- Right-click the file and select Open with, and then Choose another app.
- Select Java if it’s listed among the default programs.
- If Java isn’t listed among the programs, select the Look for another app on this PC option.
- Then browse to the Java bin folder, select Java and press the Open button.
JAR file error messages usually pop up when Java isn’t configured as the default software for a JAR file. This can be the cause of the unable to access JarFile.
Setting Java as the default program should fix the issue here.
- Fix: This Alias Cannot be Added to Your Account Error on Windows 11
- How to fix the Thinkpad if it Won’t Wake Up
- Microsoft Store Apps vs Desktop Apps: Which Ones to Use?
- Fix: Control Panel is Not Showing All Programs on Windows 11
- Fix: ATA/SATA Hard Drive not Detected in BIOS
3. Open the Jarfix Software
- Click jarfix.exe on this webpage to save the software to a folder.
- Now, open the folder and double-click the jarfix.exe option.
- The tool will start and fix issues with your jar file extension.
In some cases, the unable to access JarFile issue on IntelliJ can be because of problems with the file type associations. This Jarfix.exe software will help you fix this issue and restore normalcy on your PC.
Those are a few resolutions that might fix the unable to access JarFile error and kick-start your Java software. After that, you only need to follow the instructions carefully, and the issue should be resolved.
For further details on installing a JAR file in Windows 10, check our guide to make the process easy.
If you have any other questions, please leave them in the comments section below.
If you have recently tried to open a JAR package file, only to receive the error, “unable to access Jarfile,” this simply means that your computer either doesn’t have the right software to open the file, or you have the wrong file path. Other common reasons for getting this error is if you have an outdated version of Java, your computer is infected with malware, or the default program for opening your JAR files isn’t set correctly. Before we jump into the solutions for this, let’s take a look at what JAR is.
Understanding JAR Package Files
Java Archive or JAR is a package file format based on ZIP architecture. It is used to group together multiple Java class files, their metadata, and any resources these files need to run into one single package. The purpose of doing this is to then distribute the grouped files as needed for the running of applications and programs. In order to run the executable file in a JAR package, you must have the latest Java Run-Time Environment installed.
If you are getting the error, “unable to access Jarfile” it means that you are encountering one of the following problems:
- Your system has malware that is either preventing the Jarfile package to open.
- The Jarfile package is corrupted from malware.
- You do not have the latest Java Run-Time Environment installed.
- The default program for accessing JAR files isn’t set.
- The file path for the executable Jarfile package is incorrect.
The “unable to access Jarfile” error is quite a common one since there are many popular programs that use Java as their programming language. For instance, Netflix uses it along with Python for applications in its back-end, while Spotify uses it to stabilize data transfer, and Minecraft uses it for its launcher. Other popular programs and services that use Java include: Uber, Amazon, LinkedIn, Google, and Android OS.
1. Update Your Java to the Latest Version
The most likely reason that you are getting the, “unable to access Jarfile” error is due to an outdated version of Java. Unfortunately, outdated versions of Java Run-Time Environment are prone to security risks and loopholes, so keeping it updated is highly recommended regardless of whether you are getting the above error.
- In your computer’s search menu, type in “Control Panel”.
- In the control panel window, choose “uninstall a program” under programs.
- In the list of programs, scroll until you see Java. Or use the search program box in the top right-hand corner of the window.
- Take a look at the version number and see if it matches the latest release.
- If it doesn’t, uninstall the program by right-clicking on it.
- Choose “yes” when prompted.
- From the official Java website, download the latest version.
- Once downloaded, use the setup wizard to install Java.
Now, re-try opening your JAR package to see if the problem is fixed.
2. Make Java the Default Program for Opening JAR Packages
If you are still getting the “unable to access Jarfile” error after updating your Java Run-Time Environment to the latest version, then you may not have Java set as the default program to use for opening JAR packages.
- In your computer’s taskbar, open File Explorer.
- Find the folder that contains your JAR package.
- Right-click on the folder and choose “open,” and then Java.
- If Java is not listed, select “choose another app”.
- In the window that pops up, choose Java from the list. If it is not there, choose the “look for another app on this PC” option.
- Browse your computer for Java and find the program. Select it and hit the “open” option.
- A prompt window may open. If it does, choose “okay” and “open”.
- Double-click on your JAR package executable to open.
When browsing for Java on your computer in step 6, the most common place for it to be is in Program Files (x86)/Java/Java <Version>/Bin/Java.exe. Keep in mind that Java is usually installed to the default hard drive disk where your operating system is, unless you do a custom installation path. So, keep this in mind when trying to find Java on your computer.
3. Set Java as a Default Association Permanently
If you use a lot of programs or applications that use the Java Run-Time Environment, it is recommended that you set Java as a default association permanently in your computer, so that any JAR packages or files are automatically opened by Java.
- Press the Windows key and “I” on your keyboard to open Settings. Alternatively, type “settings” into your computer’s search menu.
- Click into the “apps” option in the Settings window.
- Choose “default apps” in the left-hand sidebar.
- Scroll until you see, “choose default apps by file type” and click it.
- Now, look for .jar in the list and click on “Choose a default” next to it.
- Find the Java Platform Program (Java Run-Time Environment) on your computer.
- Save the changes and exit.
Now restart your computer for the changes to take effect and see if you can open your JAR package without the, “unable to access Jarfile” error.
4. Check for Malware to Eliminate Infections Causing Trouble
If you are still getting the “unable to access Jarfile” error, it may be from malicious malware. A virus can easily exploit your registry and modify it to make JAR packages unusable. It is highly recommended that you run a thorough scan of your entire computer to look for malware. If you find some, remove it and uninstall Java. Repeat fix 1 in this list to reinstall.
5. Configure Hidden Files/Folders/Drives to Show
While not as common, sometimes hidden files, folders, and drives can cause the “unable to access Jarfile” error.
- In your computer’s taskbar, open File Explorer.
- At the top of the window, click on the “View tab”.
- Now click on the “Options” button to the far right.
- In the new window that opens, click on the “View tab” again.
- In the list, choose the “Show hidden files, folders, and drives” option.
- Hit Apply and then hit OK.
6. Repair Your Java Programs with Jarfix.
If you are using programs that launch with Java and they are not responding to you, no matter how many times you try to open the application, then it may be time to repair your JAR associations. To do this, simply download Jarfix, a lightweight program that fixes hijacked JAR associations, and run it.
7. Check the Documentation If You Are a Developer
If you are working in Java as a developer and come across the “unable to access Jarfile” error, it is likely that there is a minor mistake within the coding. It is recommended that you go back through and re-read to make sure that you have the right file path and the correct parameters for the code to work. Depending on what utility you are using to open and run your JAR packages, you may need to go back through and re-read the documentation on how to get it functioning properly.
Wrapping It Up
In most cases, the “unable to access Jarfile ” error will be solved by updating your Java Run-Time Environment to the latest version, but if it doesn’t solve the problem, please do try out the other methods on this list. Let us know in the comments below if we were able to help you!
-
Home
-
News
- 4 Useful Methods to Fix the “Unable to Access Jarfile” Error
By Daisy | Follow |
Last Updated
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. Sometimes, the “unable to access jarfile” error will occur when you open it. You can read this post from MiniTool to fix this error.
What Causes the “Unable to Access Jarfile” Error
There are several different reasons for the “Java unable to Access Jarfile” issue. Most of them are related to the handling of JAR files on your computer.
1. The latest Java version has not been installed on your computer.
2. The file path set for the Java executable is incorrect and points to the wrong location.
3. The default program for opening JAR files is not set.
4. Malware is on your computer.
Tip: You should ensure that you have an active internet connection and administrator account privileges before you move on to the methods.
How to Fix the “Unable to Access Jarfile” Error
- Install the Latest Java Version
- Set the Default File Association
- Check for Malware
- Check for Documentation (for Developers)
How to Fix the “Unable to Access Jarfile” Error
Method 1: Install the Latest Java Version
You need to install the proper architecture i.e. Java on your computer for programs to run JAR files. Furthermore, it should be the latest version released. Here is the tutorial.
Step 1: Press the Windows + R keys at the same time to open the Run dialogue box, then type appwiz.cpl and click OK to open the Programs and Features window.
Step 2: Then navigate to the entry of Java and right-click it, then click Uninstall.
Step 3: Then go to the official Java website and download the latest version. Run it to install the latest version of Java after you download the executable.
Restart your computer and check if the “Unable to Access Jarfile” error message has been resolved.
Method 2: Set the Default File Association
If you are still unable to access jarfile Minecraft, you can try changing the file association. Here are the steps.
Step 1: Navigate to the JAR file’s directory. Right-click it and select Open with and select the Java program.
Tip: If you do not get the option right away to open as Java, you can click Choose another app and select Java.
Step 2: Then press the Windows + I keys to launch the Settings application. Now navigate to Apps and select Default apps from the left navigation bar.
Step 3: Now click Choose default apps by file type present at the near bottom. Now locate the entry .jar file and make sure it is selected to be opened by Java.
Step 4: Then you should save changes and exit.
Restart your computer and check if the “unable to access jarfile” error message is resolved.
Method 3: Check for Malware
You should check if there is any virus or malware on your computer if you are still receiving the error when you start your operating system or any program.
You should run a thorough check on your computer and then follow method 1 to ensure all the entries and file associations are deleted and then remade when you reinstall Java. Here is how to remove malware after you check, read this post – How To Remove Malware From A Windows Laptop.
Method 4: Check for Documentation (for Developers)
If you are a developer coding with Java or other languages, you also encounter this error message when you try to start a JAR file. This can be really troublesome and will probably halt your task at hand.
It is recommended that you read the documentation for the function or utility that opens or runs the JAR file to diagnose and solve the error. You may have mistaken the file path, or you may have passed the wrong parameter to the function.
Final Words
You can know the reasons for the “Java unable to Access Jarfile” issue and 4 useful methods that can fix the error from this post. I really hope that this post can help you.
About The Author
Position: Columnist
Having been an editor at MiniTool since graduating college as an English major, Daisy specializes in writing about data backups, disk cloning, and file syncing as well as general computer knowledge and issues. In her free time, Daisy enjoys running and going with friends to the amusement park.
You are here: Home/ Software/ Java Unable To Access Jarfile On Windows 10 – How To Fix?
Some users have recently reported an error while running some applications, where they get the error message ‘Unable to access jarfile’. Here I shall discuss how you can easily solve this error on your devices. Check here to know how to uninstall java deployment toolkit.
JAR is the extension given to the package file format that Java class files use to pack metadata and resources into a single package file for distribution. When the application running the Java class files is unable to locate or process the jarfile, you will see this error message.
Usually, you can get this error message due to the following reasons:
- Outdated java application
- Incorrect location of the Java executable file
- Malware
- Default application not set for the JAR file format.
How To Fix ‘Unable To Access Jarfile’ Error Message?
Now that you know why you may be facing the unable to access jarfile in Minecraft and other applications, here are some simple solutions that you can apply to solve this error.
Solution 1: Check For Malware
Let us start by making sure that your system is up to date with the latest security measures. A regular security check is mandatory if you handle sensitive information on your computer. A virus or malware can compromise your data and put your privacy at risk.
Scan your device for viruses and malware. If you have premium third-party antivirus software, use them to scan for any hidden malware or other potential risks. Else, you can also choose from a host of free antivirus applications like Avast antivirus or Malwarebytes free anti-malware.
Solution 2: Change The Open With Option
Some users have reported that after a recent update to their Windows, the default app associated with the .JAR file format changed to some other apps installed on their device. This can also be one of the reasons that you see the Unable to access error for the .jar files on your computer.
This can be easily solved, as all you need to do is change the default app associated with the file using the right-click context menu. Here are the simple steps that you need to follow:
- First, navigate to the directory where you have saved the .JAR package using file explorer.
- Right-click on the .jar package to reveal the context menu.
- Hover over Open with > to reveal additional settings.
- Here you should see your Java application on the list.
Click on it to open the file with your java application.
If you wish to permanently change the application associated with jar file packages to the Java app installed on your computer, follow these steps:
- Right-click again on the .JAR file to reveal the context menu.
- Click on Properties from the menu.
- Under the General tab, click on the Change… button next to the Opens with section.
- This will open another dialog box listing all the applications that are installed on your computer.
- Make sure that the checkbox next to Always use this app to open .jar files is checked.
- Select your Java application from this list to bind it to the.jar file format permanently.
- Save the changes and restart your computer.
Now check if changing the default file association solved the error for you.
Solution 3: Check The Documentation For Wrong File Paths
If you are a developer facing this problem while running JAR files, you might have some additional work to do in order to solve this issue. This error is really troublesome, as you will need to crosscheck the app code that is presenting you the error.
To find out what is causing this error, you need to read the utility documentation provided of the package that shows you the error. There is a chance that there is an incorrect parameter pointing to some invalid location. If the file path is wrong, there is a chance that you may be presented with this error.
You can use coding websites like Stack Overflow to produce a demo of the function that you are trying to run. Scrub through the code to identify the problem and fix it to solve the error.
Solution 4: Update Or Reinstall The Java Application
If the solutions above failed to help solve your jarfile error, the problem might be with the java app itself. If you are not running the latest version of the Java platform, there is a chance that the .JAR package will fail to recognize the java app completely.
Update your java application. Although Java updates are usually installed automatically, sometimes you may have to manually update the app in order to solve the errors associated with the app.
If updating the app did not help you, you will need to reinstall the application completely for java to run properly. You can uninstall the application from either the control panel or use a third-party batch uninstaller (like the ones from this list) to remove residual files as well.
Next, visit the Java website. Download the latest version of the Java application on your computer and install the same.
With the latest version installed, check if the error persists. The unable to access jarfile error should now be resolved.
Solution 5: Use Jarfix To Solve Java Errors
Jarfix is a free repair utility that is used to fix problems with the java-archive. If you see java unable to access jarfile error on your computer, you can use this freeware to restore the full functionality of the java app.
Simply download the Jarfix app from this website. When you double click on the app, the .jar extension will be restored to open with the correct application.
Once the process finishes, check if the error persists. Your error should be solved.
Wrapping Up
So, there you have it. Now you know how to solve the Unable to access jarfile error message using one or a combination of the solutions provided above. Comment below if you found this useful, and to discuss further the same.
I have downloaded a program to run on windows XP.
According to the instructions, opening the .bat file that includes the command that calls the .jar file would be enough.
Yet the program does not open.
In a friend’s computer the program does open.
I have set correctly the java-related environment variables. Java works fine. I have associated .jar files with java sdk.
When calling the command
javaw -Xms128M -Xmx512M -jar filename.jar from cmd
I get a java virtual machine launcher
error: unable to access jarfile
Then I called the same command while being on the folder where the jar is, I have no error, but still the gui of the program does not open.
Any ideas?
On windows support the suggest unistalling and manually re-installing java, but java works fine in any other app.
koral
2,5131 gold badge32 silver badges41 bronze badges
asked Jan 13, 2013 at 16:06
Try some of the following:
- Run directly from the .exe, so «C:…\jre\javaw.exe» -jar
- Try java -jar instead of javaw -jar.
- Try moving the file. It could be in a permissions sensitive directory.
Also, if the program was compiled using a 64-bit JDK, it might require a 64-bit JRE to run. In that case, you’d need to have a 64-bit OS/JRE to run it.
answered May 10, 2013 at 16:52