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

 

 

参考:https://blog.csdn.net/jeamking/article/details/7881196

以上是关于linux tomcat 启动报错 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least on的主要内容,如果未能解决你的问题,请参考以下文章

linux环境启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 的解决方案

linux环境启动tomcat时报Neither the JAVA_HOME nor the JRE_HOME environment variable is defined 的解决方案

Linux下tomcat启动Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of

解决Linux下启动Tomcat遇到Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

在Linux虚拟机下安装tomcat:Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt lea

在Linux虚拟机下安装tomcat:Neither the JAVA_HOME nor the JRE_HOME environment variable is definedAt lea(示例代码