I have installed apache- maven in windows, and set the environmental variables :
M2_HOME - C:\Users\bg4730\apache-maven-3.3.9;
M2 - %M2_HOME%\bin;
JAVA_HOME - C:\Program Files\Java\jdk1.8.0_74;
Even though I am getting (JAVA_HOME is set to an invalid directory) when I am trying to check the maven installation from command line: mvn --version
If this is the actual value...
C:\Program Files\Java\jdk1.8.0_74;
The semicolon at the end should be the culprit. What happens is it gets executed like this on Windows: %JAVA_HOME%\\bin\\java
so if the semicolon is there, it's going to be part of the path that gets executed.
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.