title: How to setup Java-Home and Path in Ubuntu 12.04
body: <p>we are new to Ubuntu.Recently we changed my server OS to ubuntu 12.04 from windows 7 . every one have their own login details. one of my college installed Open-Jdk7. I asked him, where you installed JAVA, then he suggested to switch the following directory</p>
  
  <p>su root
  cd /usr/lib/Jvm
  Totally 3 folders are there in JVM folder. names are.</p>
  
  <p>java-1.7.0-openjdk-amd64</p>
  
  <p>java-7-openjdk-amd64</p>
  
  <p>java-7-openjdk-common</p>
  
  <p>generally, If you install Java in Windows, we will get 2 folder. 1 folder is for JDKand another points to JRE.</p>
  
  <p>but, in Ubuntu we have 3 folders. is it right?</p>
  
  <p>for my conformation, whether he installed correctly or not. I open Terminal. I run the following 2 commands</p>
  
  <p>java -c
   java -version
  both commands are working fine.</p>
  
  <p>now I want to set-up Java-Home and Path for all users at same place.because everyone is working on Application server.</p>
  
  <p>Can anyone explain step-by-step.</p>
  
  <p>Thanks.</p>