allwpilib
allwpilib copied to clipboard
The system cannot find the path specified // Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
Describe the question you have. How do I fix a certain message I get when building my java project Describe the reason for your confusion. I keep getting an error message when building my java project and I don't know how to fix it.
Is your question related to a problem? Please describe. Yes, I keep getting A specific set of error messages when I build my java project Additional context The terminal returns the following output below when I try to build my project
The system cannot find the path specified Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain The terminal process "cmd.exe /d /c gradlew build -Dorg.gradle.java.home="c:users\public\wpilib\2022\jdk"" terminated with exit code 1.
Have you verified you are in the correct project directory? It is likely that essential gradle files are missing. Can you create a new project and reproduce this?
I tried to simulate the examples and they started up just fine, but my project won't start the simulation
I created a new project and it builds fine? I don't know what I did to make my initial project fail to build
I would recommend just copying your code over to the new project.
I will do that, I am just trying to figure out why it happened
Did you happen to push your code to git? That error is caused by the jar in gradle/wrapper missing. We’ve seen cases where teams remove that file from the .gitignore, and then builds afterwards fail with that error.
No, I have seen people talk about that. I haven't used git for my projects. I have also seen people talk about OneDrive causing issues, but I do not have OneDrive set up on this computer
Some extremely aggressive anti-viruses could possibly remove it too.
Would Windows defender be considered extremely aggressive? I've found that it likes to yell at me about trusting folders when I make new projects.
I would not think it would be Windows defender (many of us on the development team have it on default). Have you moved the project files around at all in the past?
I moved the entire project folder to desktop, but I never moved a Folder/file around inside the project folder
Just a conjecture, but it's possible that the move only partially moved the folder. A folder move is simply a collection of individual file moves.
That is odd but it does make sense
I copied my code over into a new project and now I am receiving the error messages again @Daltz333
Are you still dealing with this issue? @IdlePhoenix1645
I haven't had access to my coding laptop for months, I cannot confirm or deny if the issue is still there at this moment.
Can this be closed?