0

Full error code:

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

This is the error I get when I try and do any mvn command after I installed maven using homebrew. I think the error may have to do with symlinks not being created properly since when I run:

which mvn

my result is:

/usr/local/bin/mvn

also when I run:

echo $M@2_HOME

I get:

/Users/USERNAME/apache-maven-3.3.9

which doesn't even seem to exist in my system. Any help would be appreciated

bfontaine
  • 14,702
  • 12
  • 64
  • 87
  • Have you tried this? http://stackoverflow.com/questions/11118237/maven-error-could-not-find-or-load-main-class-org-codehaus-plexus-classworlds-l – Pete Mar 23 '17 at 03:15
  • @AdamSmith funny enough, I tried only more complex solutions but it seems unset M2_HOME was all I needed. Thank you. – Will Suchanek Mar 23 '17 at 03:23
  • Cool :) no worries – Pete Mar 23 '17 at 03:47
  • 1
    Possible duplicate of [Maven error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher](http://stackoverflow.com/questions/11118237/maven-error-could-not-find-or-load-main-class-org-codehaus-plexus-classworlds-l) – Pete Mar 23 '17 at 04:15

1 Answers1

1

After trying more complex solutions @Pete in the first comment on the main post had my try

unset M2_HOME

and that did the trick.