'mvn' is not recognized as an internal or external command, [closed] 'mvn' is not recognized as an internal or external command, [closed] windows windows

'mvn' is not recognized as an internal or external command, [closed]


On my Windows 7 machine I have the following environment variables:

  • JAVA_HOME=C:\Program Files\Java\jdk1.7.0_07

  • M2_HOME=C:\apache-maven-3.0.3

On my PATH variable, I have (among others) the following:

  • %JAVA_HOME%\bin;%M2_HOME%\bin

I tried doing what you've done with %M2% having the nested %M2_HOME% and it also works.


Make sure you have your maven bin directory in the path and the JAVA_HOME property set


Add maven directory /bin to System variables under the name Path.

To check this, you can echo %PATH%