How to set path for Jre 6 when jre 7 installed?

前端 未结 12 810
深忆病人
深忆病人 2021-01-18 00:19

I am programming through java 1.6 u_17, but i have JRE version 6 and JRE version 7 installed, so how to run my compiled program from JDK 1.6 to run through the JRE 6 only?<

12条回答
  •  离开以前
    2021-01-18 00:42

    Looks like you are using Windows. Please go the Environment Variables and define a user variable as:

        Right Click(My Computers) -> Advanced -> Environment Variables -> Add
    
        Variable Name = JAVA_HOME
        Variable Value = Root Folder of Java 1.6.0_17 installation
    

    Also in the same screen, please check the PATH variable and make sure **bin** Folder of Java 1.6.0_17 installation is added in the path preferably in the beginning and remove the Java 7 from the path, if it is there.

提交回复
热议问题