Neither the JAVA_HOME nor the JRE_HOME environment variable is defined

Centos7.5  启动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

原因:没有安装java

解决方法:安装java

yum install java -y

  

原文地址:https://www.cnblogs.com/lvhanzhi/p/10385758.html