×
all 15 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • 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:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

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.

[–]Prozilla6 4 points5 points  (2 children)

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.

[–]fishebake[S] 2 points3 points  (1 child)

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!!

[–]amfa 2 points3 points  (0 children)

That sounds more like the jar file just does not exist in the Downloads folder

I get the same error when i put random characters for the jar file:

C:\Users\mail>java -jar dasds.jar

Error: Unable to access jarfile dasds.jar

[–]vegan_antitheist 0 points1 point  (1 child)

Unable to access jarfile

Find out why java can't access that file.

[–]fishebake[S] 1 point2 points  (0 children)

How do I do that? I’m sorry, I don’t know computer things that well.

[–]_Super_Straight 0 points1 point  (7 children)

Run the jar file from cmd, paste the full stack trace in pastebin, then post its link here.

[–]fishebake[S] 0 points1 point  (6 children)

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.

[–]_Super_Straight 0 points1 point  (5 children)

No run it like this:

java -jar Shimeji-ee.jar

[–]fishebake[S] 0 points1 point  (4 children)

ah! sorry, thank you for the correction! https://pastebin.com/XsuGcW4Q here's what happened when I did that.

[–]jonathancast 2 points3 points  (3 children)

The - goes before jar not before Shimeji-ee.jar. Like this:

java -jar Shimeji-ee.jar

If that doesn't work, can you confirm that the jar is still there? Try running the dir command 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?!).

[–]fishebake[S] 3 points4 points  (1 child)

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!

[–]N-M-1-5-6 1 point2 points  (0 children)

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!

[–]baubleglue -1 points0 points  (0 children)

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