启动Tomcat失败,错误提示:the JRE_HOME environment variable is not defined correctly
2017-08-28 20:46
531 查看
最近在学习Tomcat服务器,第一次启动服务器就出现了错误,错误提示:
the JRE_HOME environment variable is not defined correctly This environment variableis needed to run this program可是我明明java_HOME配置是正确的啊,cmd控制台和me都能正常运行,为什么不行呢?总结自己之前做过的事情,卸载jdk7.0安装8.0,tomcat6.0\7.0和jdk8.0不匹配等等问题,一个个排除,花了好长时间才得以解决。
原因:以前版本的tomcat需要JDK,现在的tomcat只要有JRE就可以。 如果你装的tomcat的是解压版的(免安装的)那么则需要自己手动配置JRE_HOME 这个环境变量,否则,就会出现上面的错误。
解决办法:右击 我的电脑 - 高级 - 环境变量, 在系统变量中 新建
变量名:JRE_HOME
变量值: D:\Program Files (x86)\Java\jdk1.8.0_111\jre(根据你自己的JDK安装目录寻找JRE)我的解决方案:JAVA_HOME = D:\Program Files (x86)\Java\jdk1.8.0_111\binJRE_HOME = D:\Program Files (x86)\Java\jdk1.8.0_111\jre解决完成后,tomcat正常启动。可以在网页中打开http://localhost:8080/ ,如果打开看到一只三脚猫,就说明服务器启动成功!
相关文章推荐
- 解决Intellij Idea里tomcat启动报The JRE_HOME environment variable is not defined correctly的错误
- 启动Tomcat错误 JRE_HOME错误 :The JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- 启动Tomcat错误:he JRE_HOME environment variable is not defined correctly
- Tomcat安装后出现the JRE_HOME environment variable is not defined correctly
- Tomcat之the jre_home environment variable is not defined correctly this environment variable is need
- Tomcat之the jre_home environment variable is not defined correctly this environment variable is need
- 在idea启动tomcat出现The JAVA_HOME environment variable is not defined correctly的解决
- 运行Tomcat出现the JRE_HOME environment variable is not defined correctly
- tomcat启动一闪而过解决办法报错The CATALINA_HOME environment variable is not defined correctly
- JRE_HOME错误 The JAVA_HOME environment variable is not defined correctly
- Tomcat The JRE_HOME environment variable is not defined correctly
- Linux下启动tomcat 6.x 提示The BASEDIR environment variable is not defined correctly
- 2个问题,解决tomcat启动一闪而过和运行tomcat/bin目录下的startup.bat时报错(the CATALINA_HOME environment variable is not defined correctly)
- JRE_HOME错误 The JAVA_HOME environment variable is not defined correctly