First install python-software-properties
:
sudo apt-get install python-software-properties
Next, remove openjdk
package if installed:
sudo apt-get remove openjdk*
Now, add java repository by webupd8team:
sudo add-apt-repository ppa:webupd8team/java
And update your system:
sudo apt-get update
For installing Oracle Java 7 run:
sudo apt-get install oracle-java7-installer
For Oracle Java 6 run:
sudo apt-get install oracle-java6-installer
For Oracle Java 8 run:
sudo apt-get install oracle-java8-installer
Posted by konjoot to wiki (2014-01-07 06:03)