cd到tomcat所在目录运行如下:
vi ./bin/startup.sh
在exec "$PRGDIR"/"$EXECUTABLE" start "$@" 这行之前添加如下配置:
JAVA_HOME=/home/david/Project/jdk1.8.0_102
JRE_HOME=/home/david/Project/jdk1.8.0_102/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME
CLASSPATH=.:$JRE_HOME/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
TOMCAT_HOME=/home/david/Project/tomcat-9