soarli

tomcat缺失java环境变量无法打开解决方案
tomcat缺失java环境变量无法打开C:\tomcat\apache-tomcat-9.0.30-window...
扫描右侧二维码阅读全文
01
2020/02

tomcat缺失java环境变量无法打开解决方案

tomcat缺失java环境变量无法打开

C:\tomcat\apache-tomcat-9.0.30-windows-x64\apache-tomcat-9.0.30\bin>startup.bat
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

打开setclasspath.bat,在

rem ---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
rem are valid and consistent with the selected start-up options and set up the
rem endorsed directory.
rem ---------------------------------------------------------------------------

加入以下两行(JDK路径)即可。

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202
set JRE_HOME=C:\Program Files\Java\jdk1.8.0_202\jre

完整:

rem ---------------------------------------------------------------------------
rem Set JAVA_HOME or JRE_HOME if not already set, ensure any provided settings
rem are valid and consistent with the selected start-up options and set up the
rem endorsed directory.
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202
set JRE_HOME=C:\Program Files\Java\jdk1.8.0_202\jre
rem ---------------------------------------------------------------------------

原文地址:

https://www.cnblogs.com/zhxlsuyu/archive/2012/02/07/2341607.html

最后修改:2020 年 04 月 01 日 10 : 17 PM

发表评论