I'm trying to run Tomcat on the latest jdk and, after setting the path in /etc/proile, /etc/environment, etc/default/tomcat8, and a couple of other places, when I go to fire up Tomcat, it says:
/opt/tomcat/bin/catalina.sh: 1: eval: /var/lib/jdk1.8.0_71/bin/java: not found
The reply for echo $JAVA_HOME
is:
/var/lib/java/jdk1.8.0_71/
and the reply for java -version
is:
java version "1.8.0_71"
Java(TM) SE Runtime Environment (build 1.8.0_71-b15)
Java HotSpot(TM) Server VM (build 25.71-b15, mixed mode)
What am I missing, please?
Try to do that like a sudo
:
sudo su vi /var/bash.bashrc
And copy following:
JAVA_HOME=/var/lib/java/jdk1.8.0_71
export JAVA_HOME
PATH=$PATH:$JAVA_HOME/bin
export PATH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.