mvn command is not recognized as an internal or external command

前端 未结 22 2441
执念已碎
执念已碎 2020-12-30 19:20

I am getting the mvn command not recognized as an internal or external command.

I have setup the M2_HOME, JAVA_HOME and added %M2_HOME%/bin to the path

22条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-30 19:46

    Are you trying to reference a user variable in system variables? Try echo %path% and the M2 should have been fully expanded to show the file path to your Maven directory. If it hasn't, then that's the problem.

    To fix it, you should create a user variable called PATH and add your %M2% reference into there.

提交回复
热议问题