If you’re going to be developing any kind of Java applications on Ubuntu, you’re definitely going to need Java JDK / JRE installed… the steps below show you how to get Oracle Java JDK 9 / JRE via PPA on Ubuntu 16.04 | 17.10 | 18.04 installed…
Oracle Java JDK is a development environment for developing applications and tools based on Java. It can also be used for testing applications and program developed using the Java programming language.
This brief tutorial is going to show students and new users how to download Oracle Java JDK / JRE and install on Ubuntu 16.04 | 17.10 | 18.04 LTS…
There’s also an alternative open source version of JAVA JDK, however, many applications already developed still rely on the Oracle version of the software…
To install Java JDK, follow the steps below:
Step 1: Add A Third Party PPA to Ubuntu
The easiest way to install Oracle Java JDK 9 on Ubuntu is via a third party PPA… To add that PPA, run the commands below
sudo add-apt-repository ppa:webupd8team/java
After running the commands above, you should see a prompt to accept the PPA key onto Ubuntu… accept and continue
Continue below to install Java 9…
Step 2: Download Oracle Java 9 Installer
Now that the PPA repository has been added to Ubuntu, run the commands below to download Oracle Java 9 installer…. the installer should install the latest Java JDK 9 on your Ubuntu machines.
sudo apt update sudo apt install oracle-java9-installer
When you run the commands above you’ll be prompted to access the license terms of the software… accept and continue..
Step 3: Configure Oracle JDK9 as Default
Set Oracle JDK9 as default, to do that, install the oracle-java9-set-default package. This will automatically set the JAVA env variable.
sudo apt install oracle-java9-set-default
The command above will automatically set Java 9 as the default… and that should complete your installation, you can check you java version by running following command.
That’s it! You have successfully installed Oracle Java JDK 9 on Ubuntu 16.04 | 17.10 | 18.04 via PPA
You may also like the post below: