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

前端 未结 7 1057
野的像风
野的像风 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:38

    This is how I did it. You don't need to delete Java 9 or newer version.

    Step 1: Install Java 8

    You can download Java 8 from here: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

    Step 2: After installation of Java 8. Confirm installation of all versions.Type the following command in your terminal.

    /usr/libexec/java_home -V
    

    Step 3: Edit .bash_profile

    sudo nano ~/.bash_profile
    

    Step 4: Add 1.8 as default. (Add below line to bash_profile file).

    export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
    

    Now Press CTRL+X to exit the bash. Press 'Y' to save changes.

    Step 5: Reload bash_profile

    source ~/.bash_profile
    

    Step 6: Confirm current version of Java

    java -version
    

提交回复
热议问题