Can we have multiple Java SDKs in one machine?

后端 未结 5 1298
天涯浪人
天涯浪人 2021-02-06 06:56

Can I have multiple java SDK versions installed on my machine?

Java 1.4 Java 2 Java 6 Java 7

please advise as I have to develop solutions for Maximo in Java 1.4

5条回答
  •  误落风尘
    2021-02-06 07:19

    Yes,you can. You need change environment variable Normally JAVA_HOME variable. So you can use another variable. eg.

    JAVA_HOME='/home/jdk1.8.0_45'
    JAVA_7='/home/jdk1.7.0_60'
    JAVA_6='/home/jdk1.6.0_34'
    

    Add path variable

    PATH=$PATH:$JAVA_HOME/bin
    PATH=$PATH:$JAVA_7/bin
    PATH=$PATH:$JAVA_8/bin
    

提交回复
热议问题