How to set JAVA_HOME for multiple Tomcat instances?

前端 未结 11 1056
情话喂你
情话喂你 2020-12-14 06:29

I have 2 Java Web Projects. One runs on JDK 1.5 and the other runs on JDK 1.6. I want to run both of them on the same computer, but the JAVA_HOME environment variable can on

11条回答
  •  借酒劲吻你
    2020-12-14 06:48

    One thing that you could do would be to modify the catalina.sh (Unix based) or the catalina.bat (windows based).

    Within each of the scripts you can set certain variables which only processes created under the shell will inherit. So for catalina.sh, use the following line:

    export JAVA_HOME="intented java home"
    

    And for windows use

    set JAVA_HOME="intented java home"
    

提交回复
热议问题