How to configure Tomcat to use Java 7

前端 未结 7 1039
长发绾君心
长发绾君心 2020-12-16 11:58

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

相关标签:
7条回答
  • 2020-12-16 12:36

    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.

    0 讨论(0)
提交回复
热议问题