New here, new to Java
Having issues with running jar files. Java and Javac are installed v23. Path is correct but it keeps saying unable to access jarfile... I ran cmd as admin and tried the following: Right click on file >> open with >> Java Platform SE Binary does absolutely nothing. Jar file I'm trying to run is an executable file. Uninstalled and reinstalled to v24. I tried a different jar file only to get unable to access jarfile (even tried moving it out of Downloads folder). These programs (jarfiles and Java) were downloaded from the official sites.
I have issues with the Java program in the past too on other things but it has been too long for me to remember what so idk what's wrong
I don't have a big knowledge of programming language or terms sorry, but I would like to learn
57 Replies
⌛
This post has been reserved for your question.
Hey @ClipSamurai! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Maybe try to code in an IDE than you don't have to worry about compilation stuff? Or why do you want to run jar files manually?
I was trying to run a program that was in .jar
You wrote that yourself or got that from someone?
Someone else but I think it is just my system/the java program itself
Hm, sry can't help you much on that specific topic @Expert
Thanks anyways and quick response, have a wonderful day
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
You too
Maybe this helps:
https://stackoverflow.com/questions/394616/running-jar-file-on-windows
https://www.wikihow.com/Run-a-.Jar-Java-File
Stack Overflow
Running JAR file on Windows
I have a JAR file named helloworld.jar.
In order to run it, I'm executing the following command in a command-line window:
java -jar helloworld.jar
This works fine, but how do I execute it with dou...
wikiHow
How to Run a .Jar Java File: 10 Steps (with Pictures) - wikiHow
This wikiHow teaches you how to open and run executable JAR files on a Windows or Mac computer. JAR (Java Archive) files contain data to be used with the Java program. Most JAR files are simply containers for data that another program...
I might have to uninstall and reinstall 😔 thanks anyway though. Edit: Didn't work, updated original post
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
Have you made it in the meantime? I could tell you the Windows registry keys to make sure, double clicking JAR files will work.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
No it hasn't worked. All I wanted was to install apktool 💀 I tried double clicking the file it literally didn't do anything
The cursor went to loading for a split second and nothing happened.
have you tried running as admin if it says no access
You should first try to run it from command line. If it will show an error, you can see it then, because doubleclick open will just swallow any errors.
Go to the folder with the JAR, open a cmd in this folder (e.g. in Windows Explorer go to the address bar and type
cmd
, press return)
Then type
and see what happens.yes
unable to access jarfile
both admin and normal
literally copied and pasted the file name so it's not that
If you had made a typo the error would be "File not found". Can you check file permissions of the jar file?
everything says allowed except for special permissions which is neither allowed nor disallowed
Since Windows by default hides file extensions did you start it with
.jar
after the filename?no and I have file extensions on
Ok because that could be a reason for this error.
literally just downloaded it and did nothing else but try to run it
I'm thinking something keeps going wrong with system/java program itself
idk not an expert
Pretty sure I got it from the official site (the java)
Ah, apparently there is some security mechanism which prevents running JAR files in the
Downloads
folder. Try copying the JAR to some other folder and run it from there.I had it in another folder in documents and just moved it to download and tried again lol
Documents might have the same mechanism.
Copy it out of the user files of possible.
Unable to access. I put it in windows cuz I didn't know where else to put it
Can you please not put it in a System folder 😅
destop doesn't work either
Ok, you can unblock files in the rightclick properties.
sorry I thought cuz I had admin access it would work
Strange, I never had that problem.
So look in the properties if there us an unblock tab
where is unblock files? In properties tab rn
not seeing any
Win10
turned off defender no avail
The post I am looking at is from 2015, so no Win 11 at all.
No, it's either the Jar which is corrupted, the OS/filesystem blocking the access or something with Cygwin paths but I think we can ignore the last cause.
should I try running some other type of java through the java program? Sometimes it works and sometimes it doesn't (on v23 idk about v24)
Can you just run
java -version
and where java
?java -version response:
java version "24.0.2" 2025-07-15
Java(TM) SE Runtime Environment (build 24.0.2+12-54)
Java HotSpot(TM) 64-Bit Server VM (build 24.0.2+12-54, mixed mode, sharing)
where java response:
C:\Program Files\Common Files\Oracle\Java\javapath\java.exe
Gah, that stupid oracle java path.
Should I uninstall and reinstall elsewhere? If so where?
also tysm for trying
No, that is not the actual installpath but some kind of link to the actual installation.
It can sometimes mess with your runtime if you have multiple java version installed. But that is not the case for you.
Well what else could we do? Do you have any other jars to test if they are running?
I could try another .jar file. Maybe my computer is just bricked. Bbl
I don't think your computer is bricked. It's either the jar file or the permissions.
Tried a different .jar same bs
yes it's in desktop not downloads
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping
.
Warning: abusing this will result in moderative actions taken against you.
did you make this jar file or you downloaded it
Downloaded it from the official site
and what happens when you try to run it through console
Unable to access jarfile. Doesn't matter where the jar file is placed and it doesn't matter if I run cmd as admin. Same result: unable to access jarfile
Isn't firewall either
can you show how you run it in console
the command
you dont have to show your user etc
also have you checked this
Stack Overflow
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 ...
I'll try using the path/to/file method again in a moment. Not sure what CygWin is but I'll look into it

I renamed the file to see if that would work
so
you see that part on the left
C:\windows\system32>
?
unless the jar is in that exact folder it isn't going to find it
try writing cd C:\Users
(i forget the exact commands for windows - but we need to get your command prompt into the same directory as the jar)I was doing that at first but it wasn't working and then it looked like people weren't doing that at all so I stopped trying that method 💀 tysm bro it works
I had the right spirit lol
Post Closed
This post has been closed by <@1410302959115567225>.