「Mac/インストール/java」の版間の差分
提供: 初心者エンジニアの簡易メモ
行22: | 行22: | ||
参考:https://qiita.com/yanap/items/186d5bd1118f68f725d8 | 参考:https://qiita.com/yanap/items/186d5bd1118f68f725d8 | ||
+ | |||
+ | ==JavaDeveloperKit(JDK) 7インストール== | ||
+ | $ brew cask install caskroom/versions/zulu7 | ||
+ | $ /usr/libexec/java_home -V | ||
+ | $ /usr/libexec/java_home -V | ||
+ | Matching Java Virtual Machines (4): | ||
+ | 1.8.0_131, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home | ||
+ | 1.7.0_232-zulu-7.31.0.5, x86_64: "Zulu 7" /Library/Java/JavaVirtualMachines/zulu-7.jdk/Contents/Home |
2019年9月11日 (水) 02:15時点における版
JavaDeveloperKit(JDK) 10インストール
$ brew cask install java $ /usr/libexec/java_home -V $ vi ~/.bash_profile export JAVA_HOME=`/usr/libexec/java_home -v 10.0` $ source ~/.bash_profile $ java -version java version "10.0.1" 2018-04-17
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"
参考:https://qiita.com/yanap/items/186d5bd1118f68f725d8
JavaDeveloperKit(JDK) 7インストール
$ brew cask install caskroom/versions/zulu7 $ /usr/libexec/java_home -V $ /usr/libexec/java_home -V Matching Java Virtual Machines (4): 1.8.0_131, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home 1.7.0_232-zulu-7.31.0.5, x86_64: "Zulu 7" /Library/Java/JavaVirtualMachines/zulu-7.jdk/Contents/Home