mvn command is not recognized as an internal or external command

前端 未结 22 2437
执念已碎
执念已碎 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:42

    Right click on My Computer >> Properties >> Advanced system settings >> System Properties window will get displayed Under Advanced >> Environment Variables

    Click on New to set Environment Variables

    Variable name: JAVA_HOME Variable value: C:\Program Files\Java\jdk1.8.0_121

    Variable name: M2 Variable value: %M2_HOME%\bin

    Variable name: M2_HOME Variable value: C:\Program Files\Apache Software Foundation\apache-maven-3.5.0

    Variable name: Path Variable value: %M2_HOME%\bin

    Then click on Ok, ok, ok. Now restart you command prompt and check again with “mvn –version” to verify the mvn is running, you may restart your system also.

    It's Working...... Enjoy :)

    Thanks Sandeep Nehte

提交回复
热议问题