Get a java environment on a mac
brew search java
brew cask install java
brew cask install java8
*Since java10 has been released and java9 is no longer supported, it is better to forget about java9 and use java10 or higher.
brew cask install java10
*By the way, there seems to be no java7
$ jenv versions
$ ls -lsa /Library/Java/JavaVirtualMachines/ jdk-10.0.2.jdk jdk1.8.0_131.jdk jdk1.8.0_181.jdk openjdk-11.jdk zulu-7.jdk -> /Library/Java/JavaVirtualMachines/zulu1.7.0_181.jdk zulu-8.jdk -> /Library/Java/JavaVirtualMachines/zulu1.8.0_181.jdk zulu1.7.0_181.jdk zulu1.8.0_181.jdk
For the above reasons, I decided to use only the following in the future java7 java8 java10
For 1.7 and 1.8, I decided to use zulu. $ jenv add /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home $ jenv add /Library/Java/JavaVirtualMachines/zulu1.8.0_181.jdk/Contents/Home $ jenv add /Library/Java/JavaVirtualMachines/zulu1.7.0_181.jdk/Contents/Home
After addition $ jenv versions
system (set by /Users/t-carlo/.jenv/version) 1.7 1.7.0.181 1.8 1.8.0.181 10.0 10.0.2 openjdk64-1.7.0.181 openjdk64-1.8.0.181 oracle64-10.0.2
$ jenv global 1.8
REF https://qiita.com/yu-iskw/items/79d9bddb77efaf2ca255 https://qiita.com/takuya71/items/8d670d8f216af87cfe01 https://qiita.com/uhooi/items/9a6747084bcfd4df07a6 https://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac https://code.i-harness.com/ja/q/190952f http://www.utsushiiro.jp/blog/archives/452 https://qiita.com/jyotti/items/22f07d807fb95fd24330
Recommended Posts