How to change Java version used by TOMCAT?

前端 未结 7 1000
时光说笑
时光说笑 2020-11-27 18:40

I have Java 1.6 and Tomcat 5.5 installed on my system.

But Tomcat 5.5 accesses Java 1.5 and hence as the outcome I get the error Bad version number in .class f

7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-27 18:54

    On Linux, Tomcat7 has a configuration file located at:

    /etc/sysconfig/tomcat7
    

    ... which is where server specific configurations should be made. You can set the JAVA_HOME env variable here w/o needing to create a profile.d/ script.

    This worked for me.

提交回复
热议问题