LoginSignup
1
0

More than 5 years have passed since last update.

Downgrade Java MacOS

Posted at

After install Java check what versions do you have:

$ java --version

Something like this will appear:

Matching Java Virtual Machines (2):
    12, x86_64: "Java SE 12"    /Library/Java/JavaVirtualMachines/jdk-12.jdk/Contents/Home
    11.0.2, x86_64: "Java SE 11.0.2"    /Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home

Select the version you want:
/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home

open your bash to edit:

$ sudo vi ~/.bash_profile

and add this line:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.2.jdk/Contents/Home

update your bash:

source ~/.bash_profile

confirm:

$ java --version
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0