title: MacOSX 10.11.4: which java version is in use
body: <p>I am aware this might look duplicated, but I don't seem to find the answer that I am seeking (perhaps is too trivial). </p>
  
  <p>I just downloaded java from the <a href="http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html" rel="nofollow">oracle</a> site and I read this:</p>
  
  <pre><code>$java -version
  java version "1.8.0_91"
  Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
  Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
  </code></pre>
  
  <p>Then I added this to my .bash_profile file:</p>
  
  <pre><code># Java
  export JAVA_HOME="`/usr/libexec/java_home -v 1.8`"
  </code></pre>
  
  <p>so that:</p>
  
  <pre><code>$ echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
  </code></pre>
  
  <p>So far so good. </p>
  
  <p>Now when I type: </p>
  
  <pre><code>$ which java
  /usr/bin/Java
  </code></pre>
  
  <p>Which I think is the default installation (?, I really have no experience in Java)</p>
  
  <p>At this stage, I don't know if I have to simlink: </p>
  
  <pre><code>sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java /usr/bin
  </code></pre>
  
  <p>or if the simlink was establish during the java installation. I am going to start installing a series of things that depend on java, so I would like to make sure I understand this before moving on. </p>
  
  <p>Thanks!</p>