Search code examples
javawindowsapachemaven

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


I get the following error when I type the command mvn --version:

'mvn' is not recognized as an internal or external command, operable program or batch file.

I have also followed this but still I am unable to get the work done.

when I type this command echo %M2_HOME% I get path printed as D:\Program Files\apache-maven-3.0.4 when I type 'echo %M2%' I get the path printed as D:\Program Files\apache-maven-3.0.4\bin

Environment : Windows XP


Solution

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