Home > OS >  Maven Error | Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Laun
Maven Error | Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Laun

Time:04-19

I am unable to install/use Maven and getting the below error.

Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

Steps on installation:

  1. Downloaded Binary zip archive (3.8.5) and put it at root C:
  2. Set Java Home and Maven home in system variables as "JAVA_HOME" and "MAVEN_HOME"
  3. Set Path variable in system variables as "%JAVA_HOME%\bin" and "C:\apache-maven-3.8.5\bin" respectively

Now if I use "maven -v" command on the command line it throws the above-mentioned class error.

Also, if I use the same command in the bin directory of maven it gives results.

P.S. I have gone through many threads here but does not resolve my problem.

CodePudding user response:

I put maven directory in Program files folder and updated path and it started working!

  • Related