This tutorial will show how to install sun java 6 jre for those having problem installing it on Ubuntu 12.04.

OAB-Java is a project hosted on that create a local ‘apt’ repository for Sun Java 6 and/or Oracle Java 7 packages. The script will no longer try and directly install or upgrade any Java packages, instead a local apt repository is created that hosts locally built Java packages applicable to your system. It is up to you to install or upgrade the Java packages you require using apt-get, aptitude or synaptic, etc.

Getting start:

  • 1. Open terminal from the dash home or press Ctrl+Alt+T.
  • 2. execute this command to get the oab-java script:

    wget -O

  • 3. give the script executable privilege:
    chmod +x
  • 4. Run the script:
    sudo ./
  • 5. Install sun-java6-jre:
    sudo apt-get install sun-java6-jre
    sudo apt-get install sun-java6-plugin sun-java6-fonts
  • 6. Optional, if you ran the script with the -7 option, you can install oracle-java7-jre:
    sudo apt-get install oracle-java7-jre

Read more about oab-java6 script