THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Switch between Java X and Java 8 (the latter installed above) by adding this to your .bash_profile and running source ~/.bash_profile afterwards
# Java 8export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home
Insatlling Java 8 using brew :
Similarly you can install java using brew by typing the following commands into a terminal and switching the default java version as stated above
brew cask install java
brew tap caskroom/versions
brew cask install java8