05 – Oracle JDK: Installation and version management

05 – Oracle JDK: Installation and version management

This time I show you two different ways to install and management Java in Ubuntu: manually and using PPA repository. The manual part of this tutorial also works fine for any linux. It’s recomended for professional installations.

Installing Oracle JDK/JRE using PPA (Recommended for my tutorials)

Open terminal and add webupd8team PPA repository:

Find proper JDK:

Install chosen version:

Default JDK directory

The default webupd8team Oracle JRE/JDK installation directory is:


Switching between Java versions

If you install more than one oracle-java<version>-installer, you can switch between them using one of:

Oracle JDK/JRE manual installation (Recommended for professionals)

Download proper JDK/JRE version from Oracle Downloads (tar.gz version) and unzip archive to ~/Tools directory.

Oracle asks you to accept licence. To download JDK with accept licence automatically just use wget with additional header:

Setting default java

Create symbolic link to selected java version:

Leave a Reply

Notify of
Close Menu