Error unable to access jarfile что делать
Перейти к содержимому

Error unable to access jarfile что делать

  • автор:

База знаний

Эта ошибка означает что сервер не может получить доступ к исполняемому jar файлу. Вам необходимо переименовать ваш исполняемый jar файл в server.jar (важно: необходимо соблюсти регистр всех букв — должны быть строчными).

Error: Invalid or corrupt jarfile server.jar
Error: An unexpected error occurred while trying to open file server.jar

Эти ошибки означают что ваш исполняемый jar файл повреждён, либо что-то другое случилось с файлом. В этом случае загрузите его заново, либо скачайте другой. Некоторые проверенные есть у нас на сайте:

  • ERROR, Unable to access jarfile server.jar, server.jar, Invalid or corrupt jarfile server.jar
  • 1022 Пользователи нашли это полезным

Связанные статьи

Если у вас не получается войти в игру и вы видите ошибку указанную в заголовке (или другую.

Следующие рекомендации помогут вам решить проблемы с подключением к серверу:1) Проверьте точность.

Рядом с точкой спавна есть защищенная зона, блоки в которой могут ставить и уничтожать только.

Остановите сервер. Удалите все файлы из папки мира сервера или укажите новое имя мира в параметре.

Это значит, что порт, который использует сервер, уже занят, или доступ к нему закрыт. Отключите.

What causes «Unable to access jarfile» error?

I want to execute my program without using an IDE. I’ve created a jar file and an exectuable jar file. When I double click the exe jar file, nothing happens, and when I try to use the command in cmd it gives me this:

Error: Unable to access jarfile
  1. Right click on project folder (Calculator)
  2. Select
  3. Click on Java Folder and select «Exectuable Jar File», then select next
  4. Launch Configuration: Main — Calculator
  5. Create Export Destination
  6. Hit «Finish» and profit! Well, not really.

46.9k 45 45 gold badges 151 151 silver badges 238 238 bronze badges
asked Aug 14, 2012 at 0:01
Joseph Smith Joseph Smith
3,293 5 5 gold badges 20 20 silver badges 18 18 bronze badges
Sounds like the Jar is corrupt in some way, possibly missing the Manifest entry.
Aug 14, 2012 at 0:04

You should show how you created the JARs, what’s in them and how you try to run the program. The Java code is irrelevant here.

Aug 14, 2012 at 0:11

Have you tried relaunching elcipse and recompiling? Sometimes Eclipse has does some strange things that can be avoided by relaunching.

Aug 14, 2012 at 0:12

I have no answers to my problem, i answered it myself, and there is no way to show my appreciation in the comments, other than thanking them via reply. Please Reread your comment.

Aug 23, 2012 at 0:14

I was able to solve it by passing absolute path for the jar file after the command «java -jar /home/aboslute_path_to_the_jar_file.jar». Hope it helps.

Feb 26, 2020 at 13:52

40 Answers 40

I had encountered this issue when I had run my Jar file as

java -jar TestJar

java -jar TestJar.jar

Missing the extension .jar also causes this issue.

answered Sep 16, 2014 at 10:26
Vinay Kadalagi Vinay Kadalagi
1,335 1 1 gold badge 8 8 silver badges 11 11 bronze badges
This is the correct answer. The .jar extension must be appended to the jar file name.
Apr 22, 2019 at 6:29
It’s not always the correct answer, I’m appending it and it doesn’t work.
Oct 7, 2019 at 10:15

In my case I thought it was a file while it was a folder on the console. The jar file was in a folder that has the same name.

Oct 23, 2019 at 16:59

This is always the incorrect Answer for this Question — the Question mentioned using the .jar extension; it wasn’t missing. Although this Answer may help in some similar situations, it wasn’t the answer to this Question’s particular situation.

Feb 19 at 23:31


I just placed it in a different folder and it worked.

6,622 8 8 gold badges 47 47 silver badges 58 58 bronze badges
answered Aug 15, 2012 at 4:05
Joseph Smith Joseph Smith
3,293 5 5 gold badges 20 20 silver badges 18 18 bronze badges
Can someone explain why this happened?
Jul 10, 2014 at 22:41
Sounds like it could have been a file permissions issue, however total guess.
Sep 9, 2014 at 10:02

I had a similar issue on WIndows, using cygwin. So cygwin uses different paths than windows /cygdrive/c/ vs C:\ I fixed this by using realpath —relative-to=$(pwd) path/to/jarfile So it will always enforce a relative path iso using /cygdrive/c/. /path/to/jarfile

Jun 14, 2016 at 9:42
I had the same problem, with my jar too, i accidentally mistyped the path of the jar
Nov 22, 2017 at 7:06
Try original path of the jar file.
Jun 20, 2018 at 18:18

[Possibly Windows only]

Beware of spaces in the path, even when your jar is in the current working directory. For example, for me this was failing:

java -jar myjar.jar 

I was able to fix this by givng the full, quoted path to the jar:

java -jar "%~dp0\myjar.jar" 

Credit goes to this answer for setting me on the right path.

1 1 1 silver badge
answered Mar 15, 2016 at 3:15
Robert Brown Robert Brown
10.9k 7 7 gold badges 35 35 silver badges 40 40 bronze badges

Thanks for this. Need to give the full path in Linux as well, if trying to run it from a different directory.

Jun 29, 2016 at 15:02

This answer is partly a duplicate of an already given answer on this question. This is the earlier answer with the same method: full quoted path. Sep 6 ’15 by @benez

Oct 28, 2019 at 15:46

I had this issue under CygWin in Windows. I have read elsewhere that Java does not understand the CygWin paths ( /cygdrive/c/some/dir instead of C:\some\dir ) — so I used a relative path instead: ../../some/dir/sbt-launch.jar .

answered Aug 4, 2016 at 17:18
radumanolescu radumanolescu
4,089 2 2 gold badges 31 31 silver badges 45 45 bronze badges
I was having this exact issue in CygWin! Thank you forever!
Apr 21, 2017 at 14:55

In cases where you need cygwin to use windows formatted paths instead of cygwin paths you can use the cygpath -w /path/here command to convert the path to the windows equivalent.

May 4, 2018 at 21:04
@JasonSlobotski thanks for the tip, I think your comment should be an answer on its own.
May 7, 2018 at 22:52

I had the same issue when trying to launch the jar file. The path contained a space, so I had to place quotes around. Instead of:

java -jar C:\Path to File\myJar.jar 
java -jar "C:\Path to File\myJar.jar" 

31.2k 25 25 gold badges 87 87 silver badges 139 139 bronze badges
answered Sep 6, 2015 at 18:05
1,856 22 22 silver badges 28 28 bronze badges

The quotations did the trick for me since I also had spaces inbetween. I then tried it without spaces in the path and without quotation marks and then it worked also

Feb 19, 2017 at 17:25

Anno 2019: This solution helped for me, with quotation marks! Without quotation marks and without spaces it doesn’t work in my case.

Oct 28, 2019 at 15:38

Just came across the same problem trying to make a bad USB.

I tried to run this command in admin cmd

java -jar c:\fw\ducky\duckencode.jar -I c:\fw\ducky\HelloWorld.txt -o c:\fw\ducky\inject.bin 

But got this error:

Error: unable to access jarfile c:\fw\ducky\duckencode.jar 


1st step

Right click the jarfile in question. Click properties. Click the unblock tab in bottom right corner. The file was blocked, because it was downloaded and not created on my PC.

2nd step

In the cmd I changed the directory to where the jar file is located.

cd C:\fw\ducky\ 

Then I typed dir and saw the file was named duckencode.jar.jar

So in cmd I changed the original command to reference the file with .jar.jar

java -jar c:\fw\ducky\duckencode.jar.jar -I c:\fw\ducky\HelloWorld.txt -o c:\fw\ducky\inject.bin 

That command executed without error messages and the inject.bin I was trying to create was now located in the directory.

Hope this helps.

9,201 2 2 gold badges 29 29 silver badges 28 28 bronze badges
answered Oct 23, 2015 at 20:26
Leon thomas Leon thomas
169 1 1 silver badge 3 3 bronze badges
Thanks, mine too was named as apktool.jar.jar
Sep 7, 2018 at 12:48
Thanks. The first step was what I needed. And second part was a typo while writing filename.
Jun 15, 2022 at 11:01

None of the provided answers worked for me on macOS 11 Big Sur. The problem turned out to be that programs require special permission to access the Desktop, Documents, and Downloads folders, and Java breaks both the exception for directly opened files and the permission request popup.

  • Move the .jar into a folder that isn’t (and isn’t under) Documents, Desktop, or Downloads.
  • Manually grant the permission. Go to System Preferences → Security and Privacy → Privacy → Files and Folders → java, and check the appropriate folders.

answered Jan 27, 2021 at 9:50
4,324 2 2 gold badges 20 20 silver badges 24 24 bronze badges

If you are using OSX, downloaded files are tagged with a security flag that prevents unsigned applications from running.

to check this you can view extended attributes on the file

$ ls -l@ -rw-r--r--@ 1 dave staff 17663235 13 Oct 11:08 server-0.28.2-java8.jar 619 68 

You can then clear the attributes with

xattr -c file.jar 

answered Oct 13, 2017 at 10:24
570 8 8 silver badges 15 15 bronze badges
see also… and…
Oct 13, 2017 at 10:24

I had a similar problem and I even tried running my CMD with administrator rights, but it did not solve the problem.

The basic thing is to make sure to change the Directory in cmd to the current directory where your jar file is.

Do the following steps:

  1. Copy jar file to Desktop.
  2. Run CMD
  3. Type command cd desktop
  4. Then type java -jar filename.jar

This should work.

Edit: From JDK-11 onwards ( JEP 330: Launch Single-File Source-Code Programs )

Since Java 11, java command line tool has been able to run a single-file source-code directly. e.g.


3 1 1 gold badge 1 1 silver badge 4 4 bronze badges
answered Dec 26, 2018 at 6:22
Vishwa Ratna Vishwa Ratna
5,655 5 5 gold badges 33 33 silver badges 56 56 bronze badges

It can also happen if you don’t properly supply your list of parameters. Here’s what I was doing:

java -jar [email protected] testing_subject file.txt test_send_emails.jar 

Instead of the correct version:

java -jar test_send_emails.jar [email protected] testing_subject file.txt 

answered Jul 15, 2015 at 8:06
3,871 8 8 gold badges 45 45 silver badges 69 69 bronze badges

This worked for me.

cd /path/to/the/jar/ java -jar ./Calculator.jar 

answered Nov 15, 2016 at 18:18
Bastian Cáceres Pino Bastian Cáceres Pino
61 1 1 silver badge 1 1 bronze badge

For me it happens if you use native Polish chars in foldername that is in the PATH. So maybe using untypical chars was the reason of the problem.

answered Oct 8, 2015 at 9:52
171 2 2 silver badges 14 14 bronze badges

sometime it happens when you try to (run or create) a .jar file under /libs folder by right click it in android studio. you can select the dropdown in top of android stuio and change it to app. This will work

enter image description here

answered Feb 17, 2016 at 10:44
anand krish anand krish
4,295 4 4 gold badges 44 44 silver badges 47 47 bronze badges

My particular issue was caused because I was working with directories that involved symbolic links (shortcuts). Consequently, trying java -jar ../../myJar.jar didn’t work because I wasn’t where I thought I was.

Disregarding relative file paths fixed it right up.

answered Nov 18, 2015 at 23:31
2,078 6 6 gold badges 23 23 silver badges 28 28 bronze badges

In my case the suggested file name to be used was jarFile*.jar in the command line. The file in the folder was jarFile-1.2.3.jar . So I renamed the file to jarFile . Then I used jarFile.jar instead of jarFile*.jar and then the problem got resolved

answered Jan 22, 2017 at 6:41
10.5k 16 16 gold badges 75 75 silver badges 120 120 bronze badges
after doing this, my unable to access jar file issue resolved.
Mar 20, 2017 at 5:58

It can happen on a windows machine when you have spaces in the names of the folder. The solution would be to enter the path between » «. For example:

java -jar c:\my folder\x.jar --> java -jar "c:\my folder\x.jar" 

4,600 6 6 gold badges 37 37 silver badges 61 61 bronze badges
answered Oct 31, 2017 at 8:57
21 1 1 bronze badge
this does not answer the question, you should use comments to ask for more information.
Oct 31, 2017 at 9:16

To avoid any permission issues, try to run it as administrator. This worked for me on Win10.

answered Mar 14, 2018 at 15:14
1,276 2 2 gold badges 15 15 silver badges 30 30 bronze badges
what about mac?
Aug 1, 2019 at 19:15

I know this thread is years ago and issue was fixed too. But I hope this would helps someone else in future since I’ve encountered some similar issues while I tried to install Oracle WebLogic 12c and Oracle OFR in which its installer is in .jar format. For mine case, it was either didn’t wrap the JDK directory in quotes or simply typo.

Run Command Prompt as administrator and execute the command in this format. Double check the sentence if there is typo.

«C:\Program Files\Java\jdk1.xxxxx\bin\java» -jar C:\Users\xxx\Downloads\xxx.jar

If it shows something like JRE is not a valid JDK Java Home , make sure the System variables for JAVA_HOME in Environment Variables is pointing to the correct JDK directory. JDK 1.8 or above is recommended (2018).

4 Useful Methods to Fix the “Unable to Access Jarfile” Error

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

  1. Install the Latest Java Version
  2. Set the Default File Association
  3. Check for Malware
  4. 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.

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.

Windows Utility Used by Malware! It Is a Big Problem!

Windows Utility Used by Malware! It Is a Big Problem!

Windows utility used by malware? It is true. To know more information about this situation, you can read this post.

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.

  • facebook
  • twitter
  • linkedin
  • reddit

About The Author

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.

Unable to Access JarFile: 3 Ways to Run JAR Files

Changing the default app for JAR files should fix this issue

Windows & Software Expert

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 October 4, 2023

  • 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.

unable to access jarfile

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.

  • 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

  1. Press the Windows key + R , type appwiz.cpl, and click OK.
    appwiz unable to access jarfile
  2. Right-click the Java app and select the Uninstall option.
  3. 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

  1. Open File Explorer and the folder that includes your JAR file.
  2. Right-click the file and select Open with, and then Choose another app.
    choose another
  3. Select Java if it’s listed among the default programs.
  4. If Java isn’t listed among the programs, select the Look for another app on this PC option.
    look for unable to access jarfile
  5. 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.

Read more about this topic

  • Solved: All 4 (Channel 4) Not Working on Smart TV
  • Solved: Spotify Won’t Play Certain Songs
  • Sky Mini Box is Not Working: How to Fix it

3. Open the Jarfix Software

  1. Click jarfix.exe on this webpage to save the software to a folder.
    jarfix download
  2. Now, open the folder and double-click the jarfix.exe option.
    open jarfix unable to access jarfile
  3. The tool will start and fix issues with your jar file extension.
    jarfix success

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.

  • error
  • Java
  • windows 10

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *