The JAVA_HOME environment variable is not defined correctly

 

用tomcat\bin下的startup.bat启动tomcat的时候出现:

Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this program

 

设置环境变量JAVA_HOME=jdk安装目录;

 

再打开startup.bat,启动tomcat出现:


 

The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
NB: JAVA_HOME should point to a JDK not a JRE

 

结果在网上一查才发现是因为JAVA_HOME路径结尾不能附加分号

 

你可能感兴趣的:(java,jdk,tomcat)