Java - why are 2 versions shown?
<p>I would like to know which version of java is installed on my ubuntu system.</p>

<p>The java -version command shows:</p>

<p><strong>cmdprompt$</strong> java -version</p>

<blockquote>
  <p>java version "1.6.0_20"</p>
  
  <p>Java(TM) SE Runtime Environment (build
  1.6.0_20-b02)</p>
  
  <p>Java HotSpot(TM) Client VM (build
  16.3-b01, mixed mode, sharing)</p>
</blockquote>

<p>However the following cmd <strong>shows 2 Java versions installed? What are these?</strong> </p>

<p><strong>cmdprompt$</strong> ls -l $(type -path -all java)</p>

<blockquote>
  <p>lrwxrwxrwx 1 root root 22 2010-02-28 14:21 <strong>/usr/bin/java</strong> -> <strong>/etc/alternatives/java</strong> </p>
  
  <p>lrwxrwxrwx 1 root root 15 2010-06-29 22:36 <strong>/usr/lib/jvm/java-6-sun/bin/java</strong> ->
  <strong>../jre/bin/java</strong></p>
</blockquote>

<p><strong>How do I ensure there is ONLY ONE version of JAVA is installed - so that there are no build conflicts?</strong></p>
