Objective

The
objective of this tutorial is to install Java on Ubuntu. We will be
installing the latest version of Oracle Java SE Development Kit (JDK) on
Ubuntu 18.04 Bionic Beaver Linux. This will be performed in three ways:
Installing Java using the Ubuntu Open JDK binaries, installing Java via
PPA and installing Java using the official Oracle Java binaries.

Operating System and Software Versions

Operating System: - Ubuntu 18.04 Bionic Beaver

Software: - Java(TM) SE Runtime Environment 8,9,10 or 11

Requirements

Privileged access to to your Ubuntu 18.04 Bionic Beaver Linux system is required to perform this installation.

Difficulty

EASY

Conventions

# - requires given command to be executed with root privileges either directly as a root user or by use of sudo command

$ - given command to be executed as a regular non-privileged user

Instructions

Install Java using the Ubuntu Open JDK binaries

In
most cases you do not need to look further to install Java on Ubuntu
than Ubuntu's repository which contains an opensource version of Java
runtime binaries called Open JDK. To install Ubuntu Java Open JDK version 11 execute: