I downloaded and unzipped the Maven directory on my C: drive.
Set M2_HOME: C:\opt\apache-maven-3.6.3 in the environment variable.
I have added %M2_HOME%\bin to the path.
But when I try to run mvn -version, it says "mvn" is not recognized.
But when I run %M2_HOME%\bin\mvn -version it works fine.
try to reload your console / command line window - IFAIK the %PATH% variable is read only once - when the console window is opened
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.