r/javahelp • u/fishebake • 10d ago
Unsolved .jar file refusing to open, just get "A Java Exception Has Occurred"
It previously worked just fine, computer updated on its own and it stopped working. It's a Shimeji, a little guy who wanders over my screen while I do things on the computer. I tried the cmd thing? "cd downloads" and got the following in response:
"C:\Users\"computer name">cd downloads
C:\Users\"computer name"\Downloads>java -jar Shimeji-ee.jar
Error: Unable to access jarfile Shimeji-ee.jar"
I downloaded the latest version of Java and nothing happened. I don't really know computers so I'm at a loss here. Any assistance would be greatly appreciated.
5
u/Prozilla6 10d ago
We need a lot more context to be able to help. For starters, copy and paste the entire output including the stack trace. It would also be very helpful if you had the source code of that jar file.
3
u/fishebake 10d ago
thank you for responding!
``Microsoft Windows [Version 10.0.26200.8655]
(c) Microsoft Corporation. All rights reserved.
C:\Users\"username">cd downloads
C:\Users\"username"\Downloads>java -jar Shimeji-ee.jar
Error: Unable to access jarfile Shimeji-ee.jar``
this is all there is, all I changed was my username because it includes my real name. I don't think there's a stack trace included here? Also, how do I find the source code of the jar file? Thanks!!
1
1
u/_Super_Straight 10d ago
Run the jar file from cmd, paste the full stack trace in pastebin, then post its link here.
1
u/fishebake 10d ago
https://pastebin.com/3RwWVfhD this is what I got when I attempted to run the jar file. I'm not familiar with anything coding related so I apologize if I ran it wrong.
1
u/_Super_Straight 10d ago
No run it like this:
java -jar Shimeji-ee.jar1
u/fishebake 10d ago
ah! sorry, thank you for the correction! https://pastebin.com/XsuGcW4Q here's what happened when I did that.
3
u/jonathancast 10d ago
The - goes before
jarnot beforeShimeji-ee.jar. Like this:java -jar Shimeji-ee.jarIf that doesn't work, can you confirm that the jar is still there? Try running the
dircommand and see if that file is listed.If I had to guess, Windows deleted your jar to conserve disk space, maybe because of a setting like this. I would strongly recommend checking your Storage Sense settings and disabling any settings that mention deleting files out of Downloads, and I would also strongly recommend copying any files you need to keep long term out of Downloads and putting them somewhere else, like Desktop or Documents. Downloads is meant to be a temporary directory, not a long-term storage location. (Although disk space is not so precious you can't clean it up manually, seriously, wth Microsoft?!).
3
u/fishebake 10d ago
you know what, I think you're right. the original zip file is there, but the jar looks to be gone. Storage Sense was on, and now it's off. I had no idea Downloads was temporary, thank you so much for letting me know!! I think I can redownload the jar file from somewhere. Let me try that!
2
u/N-M-1-5-6 10d ago
Also, the jar file you want might be inside the "original zip file" that you have? If so, you can unzip/extract the jar file from the zip file instead of re-downloading everything. Just a guess, but it might be worth checking if that's the case!
0
u/baubleglue 10d ago
It says, can't find main class. You are probably missing manifest file. Put that error into Google AI, it will give you the solution
•
u/AutoModerator 10d ago
Please ensure that:
You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.
Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar
If any of the above points is not met, your post can and will be removed without further warning.
Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.
Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.
Code blocks look like this:
You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.
If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.
To potential helpers
Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.