报错信息详细以下:java
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variable is needed to run this programlinux
问题描述:以前都是好好的,只是kill掉进程就出现这个问题tomcat
了解逻辑:先看Tomcat的startup.bat,它调用了catalina.bat,而catalina.bat则调用了setclasspath.bat。只要在setclasspath.bat的开头声明环境变量,打开tomcat的bin目录下面的setclasspath.sh,添加红色部分,路径本身修改。this
一、先查看linux环境下jdk安装目录spa
二、在bin目录下setclasspath.sh添加jdk路径blog
三、从新写入/etc/profile环境变量进程