How To Install Oracle Java 11 on Ubuntu 16.04 LTS (Xenial)
Abstract: Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTSJava(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS)
Java is a popular programming language for system software development and web application. You need to install the Java Development Kit (JDK) and Java Runtime Environment (JRE) for the setup of the Java development environment. JDK compiled the source java file and make a java class file. JRE is used to run that intermediate class file. This tutorial will guide you to install Oracle Java 11 LTS version on Ubuntu 16.04 LTS Xenial system.
- Install Oracle Java 8 on Ubuntu 6.04 Xenial
Before beginning the installation run login shell as the sudo user and update the current packages installed.
sudo apt update sudo apt upgradeStep 2 – Install Java 11 on Ubuntu 16.04
You need to add the following PPA to your Ubuntu system. This PPA contains a package oracle-java11-installer having the Java installation script.
sudo add-apt-repository ppa:linuxuprising/java
Then install Java 11 using the script provided in these packages. This script downloads the Java archive from the official site and configures on your system
sudo apt update sudo apt-get install oracle-java11-installer
Also, install the following package to configure Java 11 as default Java version on your Ubuntu 18 system.
sudo apt-get install oracle-java11-set-defaultStep 3 – Verify Java Version
Check the installed Java version on your system using the following command.
java -version java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
You have successfully installed Java 11 on Ubuntu 16.04 LTS system.
Happy coding!