I have a web application in java 6 byte code and would like to test it in a Java 7 JVM environmment. For that purpose, I would like to configure Tomcat (fo
I had installed it via
sudo apt-get install tomcat7
Setting up JAVA_HOME or PATH did not help me. I had to add entry in file- /etc/default/tomcat7
# Run Tomcat as this user ID. Not setting this or leaving it blank will use the
# default of tomcat7.
TOMCAT7_USER=tomcat7
# Run Tomcat as this group ID. Not setting this or leaving it blank will use
# the default of tomcat7.
TOMCAT7_GROUP=tomcat7
# The home directory of the Java development kit (JDK). You need at least
# JDK version 1.5. If JAVA_HOME is not set, some common directories for
# OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried.
#JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
...
This is Java 8 but you get the point.