Skip to content
Advertisement

‘mvn’ is not recognized as an internal or external command, operable program or batch file

May be question is asked before but i found very strange kind of error. When I run mvn --version command from bin its gives the version and the other information. However when I run outside bin it gives exception. Both the result mention below

JavaScript

Also i set JAVA_HOME in user variable and M2_HOME, M2 in system environment variable. The output for these variables and %path% is:

JavaScript

Tell me where i am wrong. What should i do recover from it?

Advertisement

Answer

My problem solved, path didn’t resolve %M2%. When i added location of maven-bin in the path instead of %M2% after that commands works.

I would like to thanks to all those who try to solve the problem

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement