Mac/インストール/java
提供: 初心者エンジニアの簡易メモ
JavaDeveloperKit(JDK) 8インストール
$ brew cask install java $ /usr/libexec/java_home -V Matching Java Virtual Machines (2): 10.0.1, x86_64: "Java SE 10.0.1" /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home 1.8.0_171, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home $ vi ~/.bash_profile export JAVA_HOME=`/usr/libexec/java_home -v 1.8` $ source ~/.bash_profile $ java -version java version "1.8.0_171"