Some tools don't work with Java version 12, and Google search for older Java didn't show useful information at the top, so I'll take a note here.
macOS 10.15 catalina Java is 12.0.2
% /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home
I want to install Java 8 series.
This was helpful.
--Procedures for installing Oracle Java 8 (JDK) on macOS
D / L the JDK from the Oracle site. "Java SE Development Kit 8u202"-"Mac OS X x64" was selected.
https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html |
---|
Make sure that JavaVirtualMachines has 8 series installed.
% /usr/libexec/java_home
/Library/Java/JavaVirtualMachines/openjdk-12.0.2.jdk/Contents/Home
% /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/jdk1.8.0_202.jdk/Contents/Home
There is 1.8, but since it is newly added, it is only this, so it is probably 8 series. (suitable
You can't just install it, you need to switch JAVA_HOME.
I referred to here.
--Switch Java version on OS X
Put the following two lines in your shell settings, such as .profile or .bashrc.
export JAVA_HOME=$(/System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java_home -v "1.8")
PATH=${JAVA_HOME}/bin:${PATH}
% source ~/.profile
% java -version
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
Even if you search Google by mixing various words centering on "install macOS old Java", it is painful because only the method of ** uninstalling ** old Java appears. .. Sometimes The way to install Java that you can find is no good now.
I melted a good amount of time. I hope that someone who seems to be addicted to it will be saved. ..
Recommended Posts