0
点赞
收藏
分享

微信扫一扫

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need


在之前学Java的时候,我已经配置好了JAVA_HOME,但是今天启动Tomcat服务器的时候,却闪退,而且无法访问Tomcat服务器。

接下来,我来说一下我的解决方法。

我们首先编辑一下startup.bat,在:end的最后加上pause

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need_tomcat

然后我们在dos命令窗口,输入startup.bat,看看能否启动Tomcat服务器

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need_tomcat服务器_02

结果出现了上面图片的问题

接下来分析一下问题

发现startup.bat,其实调用的是catalina.bat,而catalina.bat调用了setclasspath.bat

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need_网络协议_03

这里需要我们手动设置JAVA_HOME变量,它的值就是我们在环境变量中配置的,就算下面图片红色的地方

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need_tomcat服务器_04

设置完成后,保存,重新启动Tomcat服务器

接下来,我怀着忐忑的心情,试了一下,看看能否成功

然后,你会惊喜的发现,启动成功了。

Tomcat之the jre_home environment variable is not defined correctly this environment variable is need_网络协议_05

希望可以帮到大家。



举报

相关推荐

0 条评论