title: Java command not found on Linux
body: <p>In Oracle Enterprise Linux when I type <code>java</code> I am getting </p>
  
  <pre><code>bash: java: command not found
  </code></pre>
  
  <p>I have installed Java 1.6 and I have the following</p>
  
  <pre><code>sudo update-alternatives --config java
  
  There are 2 programs which provide 'java'.
  
    Selection    Command
  -----------------------------------------------
  *  1           /usr/lib/jvm/jre-1.4.2-gcj/bin/java
   + 2           /usr/java/jre1.6.0_24/bin/java
  </code></pre>
  
  <p>How can I resolve this issue?</p>
  
  <p>Thanks</p>