Here's a few notes on what it took to install Java on the latest El Capitan OSX: 10.11.1.
This seems to be the best way to set this up.
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
Figure out where brew put the new Java (it's not listed in the output!) and then run something like:
jenv add /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/
Then add a
.java-version file containing
That works like a