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.
Maven error: Could not find or load main class And Unable to Edit System Variables
Solution: I just uninstalled chocolatey by running command prompt as an administrator, then reinstalled it. For some reason this worked - no idea as to why but that was the solution to the error without having to change system variables.
Maven Error | Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
I put maven directory in Program files folder and updated path and it started working!
Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
You mentioned M2_HOME environment variable incorrectly.M2_HOME environment variable should be "/home/mani/apache-maven-3.2.5"
export M2_HOME=/home/mani/apache-maven-3.2.5
and Add the $M2_HOME/bin directory to your path.
Related Topics
How to Access Owl Documents Using Xpath in Java
Program Freezes During Thread.Sleep() and with Timer
How to Convert a Java 8 Stream to an Array
Why Start an Arraylist with an Initial Capacity
Sorting Using Comparator- Descending Order (User Defined Classes)
How to Obtain Localdatetime from Temporalaccessor When Parsing Localdatetime (Java 8)
How to Calculate Elapsed Time from Now with Joda-Time
Closing Jdbc Connections in Pool
How to Create an Array of Arraylists
How to Use the Instanceof Operator in a Switch Statement
How to View the SQL Queries Issued by JPA
How to Create Immutable Objects in Java
Using Bigdecimal to Work with Currencies
Test If a String Contains Any of the Strings from an Array
What Is the Maven-Shade-Plugin Used For, and Why Would You Want to Relocate Java Packages