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
JavaBot
JavaBot4w ago
This post has been reserved for your question.
Hey @ClipSamurai! Please use /close or the Close 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.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
bassus
bassus4w ago
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?
ClipSamurai
ClipSamuraiOP4w ago
I was trying to run a program that was in .jar
bassus
bassus4w ago
You wrote that yourself or got that from someone?
ClipSamurai
ClipSamuraiOP4w ago
Someone else but I think it is just my system/the java program itself
bassus
bassus4w ago
Hm, sry can't help you much on that specific topic @Expert
ClipSamurai
ClipSamuraiOP4w ago
Thanks anyways and quick response, have a wonderful day
JavaBot
JavaBot4w ago
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.
bassus
bassus4w ago
You too
bassus
bassus4w ago
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...
ClipSamurai
ClipSamuraiOP4w ago
I might have to uninstall and reinstall 😔 thanks anyway though. Edit: Didn't work, updated original post
JavaBot
JavaBot4w ago
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.
Madjosz
Madjosz3w ago
Have you made it in the meantime? I could tell you the Windows registry keys to make sure, double clicking JAR files will work.
JavaBot
JavaBot3w ago
💤 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.
ClipSamurai
ClipSamuraiOP3w ago
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.
ayylmao123xdd
ayylmao123xdd3w ago
have you tried running as admin if it says no access
Madjosz
Madjosz3w ago
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
java -jar filenameOfThe.jar
java -jar filenameOfThe.jar
and see what happens.
ClipSamurai
ClipSamuraiOP3w ago
yes unable to access jarfile both admin and normal literally copied and pasted the file name so it's not that
Madjosz
Madjosz3w ago
If you had made a typo the error would be "File not found". Can you check file permissions of the jar file?
ClipSamurai
ClipSamuraiOP3w ago
everything says allowed except for special permissions which is neither allowed nor disallowed
Madjosz
Madjosz3w ago
Since Windows by default hides file extensions did you start it with .jar after the filename?
ClipSamurai
ClipSamuraiOP3w ago
no and I have file extensions on
Madjosz
Madjosz3w ago
Ok because that could be a reason for this error.
ClipSamurai
ClipSamuraiOP3w ago
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)
Madjosz
Madjosz3w ago
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.
ClipSamurai
ClipSamuraiOP3w ago
I had it in another folder in documents and just moved it to download and tried again lol
Madjosz
Madjosz3w ago
Documents might have the same mechanism. Copy it out of the user files of possible.
ClipSamurai
ClipSamuraiOP3w ago
Unable to access. I put it in windows cuz I didn't know where else to put it
Madjosz
Madjosz3w ago
Can you please not put it in a System folder 😅
ClipSamurai
ClipSamuraiOP3w ago
destop doesn't work either
Madjosz
Madjosz3w ago
Ok, you can unblock files in the rightclick properties.
ClipSamurai
ClipSamuraiOP3w ago
sorry I thought cuz I had admin access it would work
Madjosz
Madjosz3w ago
Strange, I never had that problem. So look in the properties if there us an unblock tab
ClipSamurai
ClipSamuraiOP3w ago
where is unblock files? In properties tab rn not seeing any Win10 turned off defender no avail
Madjosz
Madjosz3w ago
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.
ClipSamurai
ClipSamuraiOP3w ago
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)
Madjosz
Madjosz3w ago
Can you just run java -version and where java?
ClipSamurai
ClipSamuraiOP3w ago
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
Madjosz
Madjosz3w ago
Gah, that stupid oracle java path.
ClipSamurai
ClipSamuraiOP3w ago
Should I uninstall and reinstall elsewhere? If so where? also tysm for trying
Madjosz
Madjosz3w ago
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?
ClipSamurai
ClipSamuraiOP3w ago
I could try another .jar file. Maybe my computer is just bricked. Bbl
Madjosz
Madjosz3w ago
I don't think your computer is bricked. It's either the jar file or the permissions.
ClipSamurai
ClipSamuraiOP3w ago
Tried a different .jar same bs yes it's in desktop not downloads
JavaBot
JavaBot3w ago
💤 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.
ayylmao123xdd
ayylmao123xdd3w ago
did you make this jar file or you downloaded it
ClipSamurai
ClipSamuraiOP3w ago
Downloaded it from the official site
ayylmao123xdd
ayylmao123xdd3w ago
and what happens when you try to run it through console
ClipSamurai
ClipSamuraiOP3w ago
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
ayylmao123xdd
ayylmao123xdd3w ago
can you show how you run it in console the command you dont have to show your user etc also have you checked this
ayylmao123xdd
ayylmao123xdd3w ago
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 ...
ClipSamurai
ClipSamuraiOP3w ago
I'll try using the path/to/file method again in a moment. Not sure what CygWin is but I'll look into it
ClipSamurai
ClipSamuraiOP3w ago
No description
ClipSamurai
ClipSamuraiOP3w ago
I renamed the file to see if that would work
emccue
emccue3w ago
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)
ClipSamurai
ClipSamuraiOP3w ago
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
JavaBot
JavaBot3w ago
Post Closed
This post has been closed by <@1410302959115567225>.

Did you find this page helpful?