配置maven environment variable,action mvn -v ,error java_home not found

时间:2022-12-16 00:24:35

First : config  JDK environment variable; action   it's ok !

Second : config maven environment variable,  system environment     name:H2_MAVEN; value:D:\apache-maven-3.3.9   ;     value  last not " ; " then open CMD,  Input "mvn -v"

Error :

ERROR: JAVA_HOME is not found in your environment
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation


Solution : Make Sure maven environment variable value  last line not " ; ", then  use  administrator  run CMD, Input "mvn -v" ; it's  ok!   as follow:


配置maven environment variable,action mvn -v ,error java_home not found


配置maven environment variable,action mvn -v ,error java_home not found