How to change Java version used by TOMCAT?

前端 未结 7 980
时光说笑
时光说笑 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:59

    When you open catalina.sh / catalina.bat, you can see :

    Environment Variable Prequisites

    JAVA_HOME Must point at your Java Development Kit installation.

    So, set your environment variable JAVA_HOME to point to Java 6. Also make sure JRE_HOME is pointing to the same target, if it is set.

    Update: since you are on Windows, see here for how to manage your environment variables

提交回复
热议问题