java – Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
java – Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
Please remove M2_HOME as environment variable, it is already set by
the mvn script. The only things you need to do is: add
apache-maven-3.x.x/bin to your path, set JAVA_HOME as environment
variable. So no need to add %JAVA_HOME%/bin to your pathTry to run mvn -v from /Library/Maven-3.3.3/bin/ folder first to
confirm the installation is correct. Try to run mvn with xtrace info
(tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html) and verify
the commandline built up by Maven. I assume you get an unexpected
classpath argument value.
For absolute new people to maven, make sure you download the Binary archives from the Maven site, and not the Source archives.
java – Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
For what its worth, I had the same error: the Could not find or load main class org.codehaus...
thing, but without any other info (youll find many people with this error message – but usually accompanied by extra info such as class loading failures).
It turns out I had a corrupted install, perhaps a some files silently failed to unzip or something. A rm -rf
of the maven directory and re-download and unzipped fixed it.
Related posts on java :
- javascript – How to create Jest mock function with Promise?
- javascript – SyntaxError: missing ) after argument list
- java : convert float to String and String to float
- java – Reading a file with unknown encoding
- strategies to reverse a linked list in JavaScript
- nlp – Looking for Java spell checker library
- Conversion from JavaScript to Python code?
- Java spread operator