I am trying to change the JVM running on Tomcat7 on my Ubuntu 14.04 that is currently running on 1.7.0_121-b00. I currently have 1.8.0_121 version and I would like to use it in the Tomcat7. I have changed the configuration in /etc/default/tomcat7 as follow:
# 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
But when I restart Tomcat7 it gave me the following error
/etc/default/tomcat7: /usr/lib/jvm/java-8-oracle: Permission denied
although I already am a root in this case. Is there something wrong with it?