安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

今天win10安装tomcat突然就报错了,做个小记

The JRE_HOME environment variable is not defined correctly
This environment variable is needed to run this program

搜索进行了如下配置,tamcat bin目录下setclasspath.bat文件进行配置(Windows环境在setclasspath.bat中配置,linux环境在

setclasspath.sh中配置)

安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

结果还是报错,

安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

不知道是电脑差异还是什么,看到有人贴图是这么配置的(配置到bin),并且有成功的截图,

修改了此配置,只配置到tomcat的目录下,启动成功.

安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

启动成功

安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

安装tomcat报错Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of the

 

另外,只安装一个tomcat的话,环境变量不需要配置CATALINA_BASE,配置的话可能会报错startup.up不是内部命令或批处理文件...

只需配置catalina_home即可,

其余配置,正常安装tomcat,配置catalina_home变量即可.