title: Unable to change path for Maven on Mac
body: <p>I was trying to change <code>M2_HOME</code> in <code>bash_profile</code> to configure a new version of Maven. Earlier, it was set to <strong>2.2.1</strong>. Now I'm trying to change the path to <strong>3.3.3</strong>. This is my <code>bash_profile</code>  </p>
  
  <pre><code>export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
  export M2_HOME=/usr/local/apache-maven-3.3.3
  #export M2_HOME=/usr/local/apache-maven-2.2.1
  export PATH=$PATH:$JAVA_HOME/bin
  export PATH=$PATH:$M2_HOME/bin
  export CATALINA_HOME=/Library/Tomcat/apache-tomcat-7.0.68  
  </code></pre>
  
  <p>When I try to run <code>source ~/.bash_profile</code> and then <code>mvn -version</code> I get the following error -  </p>
  
  <pre><code>$mvn -version
  Error: Could not find or load main class org.codehaus.classworlds.Launcher  
  </code></pre>
  
  <p>Any suggestions to solve this please?</p>
  
  <p>PS: I'm on OS X El Captain</p>