Hello Linux Geeksters. If you prefer to use the Oracle Java instead of OpenJDK, which is available from the default repositories of Ubuntu and derivatives, including Linux Mint and Elementary OS, you can easily install it via the WebUpd8 PPA.
In this article I will show you how to install the Oracle Java 8, Oracle Java 7 or Oracle Java 6, on Ubuntu 14.04 Trusty Tahr, Ubuntu 13.10 Saucy Salamander, Ubuntu 12.10 Quantal Quetzal, Ubuntu 12.04 Precise Pangolin, Linux Mint 16 Petra, Linux Mint 14 Nadia, Linux Mint 13 Maya and Elementary OS 0.2 Luna.
Before you begin the installation, you should know that Java 6 is old and Java 8 is still under the Beta testing stage, so it is best to install the Oracle Java 7, for now. Howerver, I will show you how to install each of this three.
How to install Oracle Java 7 on Ubuntu, Linux Mint and Elementary OS:
$ sudo apt-get remove openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java7-installer
To set Oracle Java 7 by default, do:
$ sudo apt-get install oracle-java7-set-default
How to install Oracle Java 8 on Ubuntu, Linux Mint and Elementary OS:
$ sudo apt-get purge openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
To set Oracle Java 8 by default, do:
$ sudo apt-get install oracle-java8-set-default
How to install Oracle Java 6 on Ubuntu, Linux Mint and Elementary OS:
$ sudo apt-get purge openjdk*
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java6-installer
To set Oracle Java 6 by default, do:
$ sudo apt-get install oracle-java6-set-default
There has a mistake in the paragraph 11,it should be”how to install Oracle Java 6 on Ubuntu, Linux Mint and Elementary OS:“
yes you are right. thank you for letting me know. i have fixed it.
Great! I had tried to install Java 7 and got things messed up. This time by removing the’open jdk*’ and getting the repository, the update, the install and setting the default I managed to get it all I believe.
I guess the next thing is to throttle the JRE into action to get everything going, isn’t it? TKS. JPA