Here’s a few notes on what it took to install Java12 on the latest El Capitan OSX: 10.11.1.
This seems to be the best way to set this up.
brew update brew install caskroom/cask/brew-cask
brew install jenv echo 'export PATH="$HOME/.jenv/bin:$PATH"' >> ~/.zshrc echo 'eval "$(jenv init -)"' >> ~/.zshrc
Install latest Java:
brew cask install java
The next is figure out where is the new JDK installed location, normally in the /Library/Java/JavaVirtualMachines/jdk******/Contents/Home/. The JDK version might be different.
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/
When you execute the jenv add command, might return an error message shows:
ln: /Users/XXX/.jenv/versions/oracle64-126.96.36.199: No such file or directory
Then we just create the missing folder as the location above:
Check the new Java version: