title: after installing java 8, javac -version works on my mac but not java -version
body: <p>I'm experiencing some difficulty setting up my <strong>java 8</strong> dev environment on my macbook pro <strong>OS 10.10.5</strong></p>
  
  <p>In the terminal I executed the below:</p>
  
  <pre><code>brew update
  brew cask install java --force 
  </code></pre>
  
  <p>after the above steps were complete, it says: </p>
  
  <blockquote>
    <p>java was successfully installed!</p>
  </blockquote>
  
  <p>Now I need to figure out how to setup my JAVA_HOME variables in .bash_profile.</p>
  
  <p>But I'm seeing the below weird situation: </p>
  
  <pre><code>petesp$ javac -version
  javac 1.8.0_102
  </code></pre>
  
  <p>But what the heck is going on below and why? How do I setup the JAVA_HOME on my MAC for java 8?</p>
  
  <pre><code>petesp$ java -version
  -bash: java: command not found
  </code></pre>
  
  <p>Why is the java -version not found? thats totally weird. If I used brew to install java, I'm assuming both javac -version and java -version should run correctly.</p>