首页 > 编程语言 > 详细

Ubuntu下tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

时间:2020-05-06 15:47:25      阅读:82      评论:0      收藏:0      [点我收藏+]


启动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

解决方法:编辑文件 /usr/local/tomcat/bin/catalina.sh (根据你自己的jdk路径进行修改) 在文件的正文开头,即正式代码前,大概在99行添加如下代码:
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_231
export JRE_HOME=/usr/lib/jvm/jdk1.8.0_231/jre

Ubuntu下tomcat启动报错:Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

原文:https://www.cnblogs.com/51ma/p/12836538.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!