Problem with installing Java: java: command not found
Looks like Java is not in the path.  I do something like this in my ~/.bash_profile

# Get Java Home for the specific version
JAVA_HOME=`/usr/libexec/java_home -v1.8 2&gt;/dev/null`
# Add Java to the path
export PATH=$JAVA_HOME/bin:$PATH


Quit terminal once you create or edit ~/.bash_profile.  FYI if you are creating ~/.bash_profile make sure you give it executable privileges.