linux tomcat 启动报错 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least on
Posted L12345
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux tomcat 启动报错 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least on相关的知识,希望对你有一定的参考价值。
报错信息
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
原因:找不到jdk或者jre路径。
解决办法:打开tomcat的bin目录下面的setclasspath.sh,添加如下代码,路径修改为自己机器jdk和jre路径即可。
export JAVA_HOME=/home/soft/jdk1.8.0_171/ export JRE_HOME=/home/soft/jdk1.8.0_171/jre
以上是关于linux tomcat 启动报错 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least on的主要内容,如果未能解决你的问题,请参考以下文章