0

After upgrading to Big Sur 1.6 I had to run Maven. mvn clean install. I got the following error Error: Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

I followed the suggestion offered here. Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

No luck.

I tried removing and reinstalling both maven and java to the latest stable releases (Maven 3.8.3 and Java 14). That didn't work either.

I am finding others having these problems, but have not found a solution that works.

Has anyone found a solution.

user2578276
  • 11
  • 1
  • 3

1 Answers1

0

If you have installed the maven using brew install maven and haven't setup the path variables accordingly you would get these types of issues.

To fix this remove the maven you installed via brew and download the apache maven binary zip and extract it. Then setup the path variables as shown here

Same goes for java. You should remove any sort of JDK you have installed using brew and download and install a JDK from a .dmg file. I would recommend using Oracle JDK if you can.

After doing that setup the JAVA_HOME and add it to the PATH variable.

After that it should work.

Nipuna Upeksha
  • 348
  • 3
  • 15
  • I found that with 11.6 I had to move all paths to home/.zshrc file – user2578276 Oct 06 '21 at 23:36
  • Yes it depends on the shell you are using. First check the shell by typing `echo $SHELL`. Even if you are using the zsh shell, it is better to set up them for bash shell too. Because if you type `vi ~/.bash_profile` you can see there is a file. – Nipuna Upeksha Oct 07 '21 at 04:44