cmd cannot find mvn command

前端 未结 3 679
清歌不尽
清歌不尽 2021-01-20 03:06

I just installed Maven and added the \\bin directory of maven to my path variables. When I try to use the mvn command in the Command Prompt I just

3条回答
  •  爱一瞬间的悲伤
    2021-01-20 03:42

    Following this tutorial by mkyong, I was able to get this to work on Windows 10 (v10.0.15063):

    1. Install JDK and setup JAVA_HOME system variable

    2. Download Maven zip, extract it and setup M2_HOME and MAVEN_HOME system variables to point to root maven folder (without \bin)

    3. Update PATH system variable to include %M2_HOME%\bin (this is what will let you run "mvn" in Command Prompt).

    4. Open Command Prompt (cmd.exe) and execute mvn -version


    You can download Maven (apache-maven-3.5.0-bin.zip) here, if you don't have it already.

    The Java SDK (jdk-8u144-windows-x64.exe) can be downloaded from Oracle here.

提交回复
热议问题