Ubuntu comes with an opensource java installed. To use the oracle’s java,
you need to remove the openjkd and install oracle’s.
First we need to remove the openjdk from Ubuntu.
1 | sudo apt-get purge openjdk* |
Then add webupd8team repository, since Oracle still don’t have an official repository.
1 | sudo add-apt-repository ppa:webupd8team/java |
After the update finished, we can install java via:
1 | sudo apt-get install oracle-java8-installer |