linux 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

报错信息

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

猜你喜欢

转载自www.cnblogs.com/L237/p/12722076.html
今日推荐