Setting up Java on Ubuntu Linux
Enter the command
sudo apt-get install openjdk-7-jdk. Enter the root password and let the system do it’s tasks.
apt-cache search jdk
Set “JAVA_HOME” and “PATH” environment Variables:
Select installation components — this may be required for servers where specific configurations are needed
Select installation path
Incase you already have Java installed, a warning will be shown