New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter #717
Comments
I heard of this exception , this was a valid bug and the solution is to upgrade your jdk , also if that still persists then update your maven version . If the problem still persists then look at your environment variables , usually stuff like this happens due to this . |
While the line you posted is the accepted answer, the answer below that indicates that can break some other Spring Boot integration and they (and other internet sources) recommend this instead: Alternately we can just require version 3.0.0-M1 of the plugin. |
Good to know.
@BilalAM do you mean use JDK 11? |
Browsing the upstream issue, Oracle Java 1.8.0_191 is mentioned. Not sure if that is the point that causes the issue or fixes it, though... Given the bug is fixed in 3.0.0-M1 I think this may be the best solution. |
Looking in detail at the upstream issue:
Fixes:
|
Background:
I'm a first timer trying to resolve the issue #702 and I have been following the CONTRIBUTING.md file. I cloned the project, installed maven (
sudo apt install maven
) and then ranmvn test
as per the CONTRIBUTING.mdI got the following error:
Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter
I then tried using
mvnw test
file on ~/oshi/ directory but still got the same error.However, with a quick Google search, I ended up here which said to add the following line to pom.xml:
<useSystemClassLoader>false</useSystemClassLoader>
I am now finally able to run tests. I am creating this issue so that newcomers like me wouldn't have to go through this again.
OS: Debian Stretch x64
Maven version 3.3.9
Java: openjdk version "1.8.0_181"
The text was updated successfully, but these errors were encountered: