Downgrade Java MacOS

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

Recommended Posts

Downgrade Java MacOS
Java version control on macOS
Downgrade Java on openSUSE Linux
Java
[Java] [Spring] Spring Boot 1.4-> 1.2 Downgrade Note
Java
Java learning (0)
Studying Java ―― 3
[Java] array
Java protected
[Java] Annotation
[Java] Module
Studying Java ―― 9
Java scratch scratch
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
java (override)
java (method)
Java Day 2018
Java string
java (array)
Java static
Java serialization
java beginner 4
JAVA paid
Studying Java ―― 4
Java (set)
java shellsort
[Java] compareTo
Studying Java -5
java reflexes
java (interface)
Java memorandum
Java array
Studying Java ―― 1
[Java] Array
[Java] Polymorphism
Studying Java # 0
Java review
java framework
Java features
[Java] Inheritance
FastScanner Java
Java features
java beginner 3
Java memo
java (encapsulation)
[Java] Overload
Decompile Java
[Java] Annotation
java notes
Java (add2)
JAVA (Map)
[java] interface
Java9 collection
Java basics
Java methods