mac에서 자바 여러개 설치 사용
http://davidcai.github.io/blog/posts/install-multiple-jdk-on-mac/
https://gist.github.com/ntamvl/5f4dbaa8f68e6897b99682a395a44c2e
$ brew install cask
$ brew cask search java
==> Matches
charles-applejava java java8 yourkit-java-profiler
eclipse-java java-jdk-javadoc netbeans-java-ee
eclipse-javascript java6 netbeans-java-se
$ brew cask info java8
java8: 1.8.0_172-b11,a58eab1ec242421181065cdc37240b08
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Not installed
From: https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/java8.rb
==> Name
Java Standard Edition Development Kit
==> Artifacts
JDK 8 Update 172.pkg (Pkg)
==> Caveats
This Cask makes minor modifications to the JRE to prevent issues with
packaged applications, as discussed here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361
If your Java application still asks for JRE installation, you might need
to reboot or logout/login.
Installing java8 means you have AGREED to the license at
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
$ brew cask info java
java: 10.0.1,10:fb4372174a714e6b8c52526dc134031e
https://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/java.rb
==> Name
Java Standard Edition Development Kit
==> Artifacts
JDK 10.0.1.pkg (Pkg)
==> Caveats
This Cask makes minor modifications to the JRE to prevent issues with
packaged applications, as discussed here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411361
If your Java application still asks for JRE installation, you might need
to reboot or logout/login.
Installing java means you have AGREED to the license at
https://www.oracle.com/technetwork/java/javase/terms/license/index.html
$ brew cask install java8