How to set JAVA_HOME for multiple Tomcat instances?

前端 未结 11 1069
情话喂你
情话喂你 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-14 06:43

    I had the same problem my OS is windows 8 and I am using Tomcat 8, I just edited the setclasspath.bat file in bin folder and set JAVA_HOME and JRE_HOME like this...

    @echo off
    ...
    ...
    set "JRE_HOME=%ProgramFiles%\Java\jre8"
    set "JAVA_HOME=%ProgramFiles%\Java\jdk1.7.0_03"
    ...
    ...

    and it works fine for me now......

提交回复
热议问题