How to Download & Install Java in Linux(Ubuntu)
Following is a step by step guide to install Java on Linux. In this training, we will install Java on Ubuntu. The process and install commands remain the same, for different flavors of Linux, or versions of Java.
How to Install Oracle Java on Ubuntu Linux
Step 1) Before you start with the setting up Java, you will need to remove the OpenJDK/JRE from the system.
To do this, use below command-