Install maven under Win10, configure the environment variables, and the prompt is not an internal command

In Win10, in the process of installing mvn, when the environment variable is set and executed, it is found that mvn is not an internal command.

The reason is that the set M2_HOME or MAVEN_HOME variables are not parsed normally by the PATH. If you find that there is a path such as %M2_HOME%\bin (%MAVEN_HOME%\bin) in the Path and do not know the path of the mvn displayed directly, this is the case.

The solution is to directly add the path of mvn to Path, do not use variables, such as:
D:\maven\apache-maven-3.3.9\bin
to solve this problem.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326995167&siteId=291194637