TOMCAT启动时报错:the CATALINA_HOME environment variable is not defined correctly

运行tomcat/bin目录下的startup.bat时报错:
the CATALINA_HOME environment variable is not defined correctly

 TOMCAT启动时报错:the CATALINA_HOME environment variable is not 
defined correctly

碰到这个问题时的第一反应是添加CATALINA_HOME环境变量:
TOMCAT启动时报错:the CATALINA_HOME environment variable is not 
defined correctly
TOMCAT启动时报错:the CATALINA_HOME environment variable is not 
defined correctly
 
添加环境变量后发现问题不能解决,还是报同样的错误,打开startup.bat脚本,找到出错的位置TOMCAT启动时报错:the CATALINA_HOME environment variable is not 
defined correctly
TOMCAT启动时报错:the CATALINA_HOME environment variable is not 
defined correctly
 
阅读代码后可以发现:
1. 未设置CATALINA_HOME变量时,系统会将cd所在的路径设置为CATALINA_HOME,所以引发了第一次的报错
2. 手动CATALINA_HOME变量后,仍然产生同样报错的原因是因为环境变量后加了一个分号(;),所以33行中的%catalina_home%\bin\catalina.bat路径里面\bin前面会多一个分号(;),引发了第二次报错,去掉CATALINA_HOME中的分号后问题解决

TOMCAT启动时报错:the CATALINA_HOME environment variable is not defined correctly

上一篇:PHP 中文分词及全文检索的实现


下一篇:3Dmax软件场景灯光的体积效果怎么体现?