Paul Hammant's custom brew formulas
brew tap paul-hammant/tap
Now just follow the installation instructions below for any of the formulas you want.
$ brew install switchjdk
# or
$ brew install paul-hammant/tap/switchjdk
After that ...
$ source ~/.bash_profile
... or close and reopen terminal tabs.
switchjdk: https://github.com/paul-hammant/switchjdk