当我尝试使用startup.bat
通过cmd提示启动Apache Tomcat服务器时,我收到此错误:
JRE_HOME variable is not defined correctly. The environment variable is needed to Run this program
我已将以下环境变量路径定义为 -
CATALINA_HOME - C:\Tomcat\apache-tomcat-7.0.78;
JAVA_HOME - C:\Program Files\Java\jdk1.8.0_65;
JRE_Home - C:\Program Files\Java\jre1.8.0_77;
CLASSPATH - C:\Program Files\Java\jdk1.8.0_65;\bin;C:\Program Files\Java\jre1.8.0_77\bin;C:\Tomcat\apache-tomcat-7.0.78\lib;
答案 0 :(得分:0)
您可以通过
检查路径的有效性echo%JAVA_HOME%
echo%JRE_HOME%
回显%CATALINA_HOME%
尝试将CLASSPATH设置为
CLASSPATH =%JAVA_HOME%\ bin中;%JRE_HOME%\ bin中;%CATALINA_HOME%\ lib中