I'm trying to upgrade my servers to Java8 from Java7 so that they will run my webapps under Java8. On one of my machines I'm getting the following error and I'm not sure what is still referring to java-7
$ sudo service tomcat7 start * Starting Tomcat servlet engine tomcat7 start-stop-daemon: unable to stat /usr/lib/jvm/java-7-oracle/bin/java (No such file or directory)
This server is Ubuntu 14.10 (Utopic). I have uninstalled all java-7 and java-6 packages. I now have the following java packages installed:
I have a /usr/share/tomcat7/bin/setenv.sh file with the line:
JAVA_HOME=`readlink -f /usr/bin/javac | sed 's|/bin/javac||g'`
The java alternatives seems to point to the right thing:
$ update-alternatives --display java java - manual mode link currently points to /usr/lib/jvm/java-8-oracle/jre/bin/java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java - priority 1069 slave java.1.gz: /usr/lib/jvm/java-8-openjdk-amd64/jre/man/man1/java.1.gz /usr/lib/jvm/java-8-oracle/jre/bin/java - priority 1080 slave java.1.gz: /usr/lib/jvm/java-8-oracle/man/man1/java.1.gz Current 'best' version is '/usr/lib/jvm/java-8-oracle/jre/bin/java'.
Java 8 works correctly:
$ java -version java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
I can't figure out why something is still looking for java-7. The following grep reveals no clues:
$ sudo grep -r java-7 /etc/tomcat7 /etc/init.d/tomcat7 /var/lib/tomcat7/ /usr/share/tomcat7
What is causing tomcat7 to look for java-7 still?