When the system has multiple sets of JDK, it is inconvenient for the system to be equipped with unified java_home, we may want to specify the JDK path for Tomcat.
1.Linux Tomcat Specifies the JDK path
Locate $cataline_home/bin/catalina.sh and setclasspath.sh, and add them after the presentation of the notes at the beginning of the file (specific values are modified according to their own JDK path):
#self-definedexport java_home=/opt/java7_64/export jre_home=/opt/java7_64/jre/
Changes in the catalina.sh
Changes in the setclasspath.sh
2.Windows Tomcat Specifies the JDK path
Locate $cataline_home/bin/catalina.bat and Setclasspath.bat, and add them after the presentation of the notes at the beginning of the file (specific values are modified according to their own JDK path):
#self-definedset java_home=d:\java\jdk1. 8 . 0_121set jre_home=d:\java\jdk1. 8. 0_121\jre\
TOMCAT Specifies the JDK path (linux+windows)