title: Why is java not recognized after Oracle JDK 7 is installed in Mac OS Lion
body: <p>I have installed Oracle JDK 7 u21 (64bit) on my Mac OS X Lion 10.8.3 MacBook. 
  Both javac -version and java -version return the correct information on my machine.</p>
  
  <p>Now, based on my installation instructions, my friend installed it on her machine.
  [Note:I have a detailed installation document that I made for this purpose.]
  Previously the machine had Apple JDK 6 on it.</p>
  
  <p>However after the installation, she reports a problem.
  When she types in sudo javac -version, she gets returned the correct javac version.
  However when she tries sudo java -version
  she gets an error, telling her that java is a command that it does not recognize.
  I spent a couple of hours yesterday, trying to get this problem fixed on her machine through a Skype session, but to no avail.</p>
  
  <p>So the purpose of this question is to find out: what could she be missing in this installation and configuration? What could be going wrong on her machine with the same instructions that worked on my machine that has an identical version of Mac OS and the same Oracle JDK installer?</p>