1. 程式人生 > >JAVA_HOME not recognized by tomcat7 in Ubuntu

JAVA_HOME not recognized by tomcat7 in Ubuntu

chang fault .bashrc point source port missing tomcat7 openjdk

vi .bashrc 添加:

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export JRE_HOME=$JAVA_HOME/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
source .bashrc

changed /etc/init.d/tomcat7 to point to oracle Java8 which is missing here!

JDK_DIRS="/usr/lib/jvm/default-java ${OPENJDKS} /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-oracle **/usr/lib/jvm/java-8-oracle**
"

JAVA_HOME not recognized by tomcat7 in Ubuntu