windows 启动tomcat 提示Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

运行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

解决方法:

找到tomcat 安装目录bin下的setclasspath.bat文件,打开后,新加如下配置:

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_241
set JRE_HOME=C:\Program Files\Java\jre1.8.0_241

新加红框配置,则重新启可以解决。

猜你喜欢

转载自www.cnblogs.com/marshal1983/p/12590850.html