title: Apache Maven install "'mvn' not recognized as an internal or external command" after setting OS environmental variables?
body: <p>I've followed the official installation instructions <a href="http://maven.apache.org/download.html#Installation" rel="noreferrer">here</a> for Windows XP. But sometimes when I execute <code>mvn --version</code>, I receive the error message,</p>
  
  <blockquote>
    <p>'mvn' not recognized as an internal or external command</p>
  </blockquote>
  
  <p>I've even rebooted my machine a couple times, but the OS does not always recognize the maven command. But when I execute either, <code>cd %M2_HOME%</code>, or <code>cd %M2%</code> it brings me to the installation directory. I've also made sure to add the user variable <code>M2</code> to the <code>Path</code> system variable.</p>
  
  <p>So, what gives? </p>