How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9

前端 未结 7 1079
野的像风
野的像风 2020-12-02 04:27

How to downgrade Java from 9 to 8 on a macOS Sierra 10.12.6(16G29) . I tried removing the Java plugin and installed Java 8, however the Java and javac version shows 9 in ter

7条回答
  •  生来不讨喜
    2020-12-02 04:46

    You don't need to down grade. You can run more than one version of Java on MacOS. You can set the version of your terminal with this command in MacOS.

    # List Java versions installed
    /usr/libexec/java_home -V
    
    # Java 11
    export JAVA_HOME=$(/usr/libexec/java_home -v 11)
    
    # Java 1.8
    export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
    
    # Java 1.7
    export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)
    
    # Java 1.6
    export JAVA_HOME=$(/usr/libexec/java_home -v 1.6)
    

    You can set the default value in the .bashrc, .profile, or .zprofile

提交回复
热议问题