Switching java version (memorial)

How I wrote this article

The school program didn't support java10 on my mac, so I wanted to be able to switch to java8. Also, it seems that java8 cannot be used due to the license.

java10

$ export JAVA_HOME=`/usr/libexec/java_home -v "10"`
$ PATH=${JAVA_HOME}/bin:${PATH}

java8(AdoptOpenJDK8)

$ export JAVA_HOME=`/usr/libexec/java_home -v "1.8"`
$ PATH=${JAVA_HOME}/bin:${PATH}

Install homebrew-cask-version

$ brew tap homebrew/cask-versions

Install AdoptOpenJDK 8

$ brew cask install adoptopenjdk8

reference

Use multiple versions of Java with Brew on Mac

Recommended Posts

Switching java version (memorial)
Simplify java version switching (Mac)
Java version check
[Java] Convert PDF version
Java version notation comparison
Learning Java framework # 1 (Mac version)
Java version control on macOS
Java version 8 and later features
How to lower java version
Ruby version switching with rbenv
Java version control with jenv
Java version change on CentOS
Java version notation that changes in Java 10
[Java version] The story of serialization
Java method list (memorial) (under construction)
Java
Java
Add index with Java8 Stream.map (tuple version)
Using JavaScript from Java in Rhino 2021 version
Installation of OMC APM Agent --Java version-
Eclipse screen layout change method (Java version)
Java version control with jenv on OSX
Download and install Eclipse (Java) (Mac version)
How to install the legacy version [Java]
Java version control using cask + anyenv + jenv
# Java: vol1: [java / JDK version control best practice]
Java installation (Mac, Homebrew, multiple version control)