mvn command is not recognized as an internal or external command

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

    I had this same error but my problem was I had the following:

    M2_HOME = C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.2.1;

    Which meant my PATH = %M2_HOME%\bin; (etc)

    ...became C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.2.1;\bin

    i.e. a semicolon was where it shouldn't be.

    Which I discovered because Michael Ferry suggested using 'ECHO %PATH%' to see what the actual PATH output was.

提交回复
热议问题