Oracle Java 16 was released on 16 March 2021 and will provide 17 enhancements that will go a long way in boosting developer productivity. The Java 16 release is a result of many weeks of extensive collaboration between the worldwide Java developer community and Oracle engineers to deliver a robust development platform.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Java queries on Linux systems.
In this context, we shall look into how to install Oracle Java 16 on Ubuntu 20.04.
What is new about Java 16?
- New language improvements.
- New tools to boost developer productivity.
- Better memory management to enhance performance.
- Improved networking to boost developer productivity & flexibility.
- New ports to provide additional support for Java on multiple platforms.
How to Install Oracle Java 16 On Ubuntu Linux system ?
To install Oracle Java 16 on Ubuntu, we need to follow the below outlined steps.
1. Perform system update
Before installing Java, you need to Update the system and install dependencies. This can be implemented by updating the package index with the below command:
$ sudo apt update
Next, install the dependencies required during the installation:
$ sudo apt install software-properties-common
2. Add Oracle Java PPA repository
The Linux Uprising PPA https://launchpad.net/~linuxuprising/+archive/ubuntu/java provides an automated script and packages that downloads and installs Oracle Java.These packages are are part of the WebUpd8 Oracle Java PPA packages. Note, however, that due to licensing, Java Binaries are not included in this PPA.
To add the Linux Uprising PPA, run the command shown. When prompted hit ENTER:
$ sudo add-apt-repository ppa:linuxuprising/java
Next, Append the Linux Uprising PPA to the sources list file. But first, switch to root user:
$ sudo su
Then add the PPA with the below command:
$ echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/linuxuprising-java.list
Next, import the GPG signing key:
$ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
Thereafter, Update the package lists to synchronize with the Linux Uprising PPA:
$ sudo apt update
3. Install Oracle Java 16 on Ubuntu
Finally, install Oracle Java 16 using the below command:
$ sudo apt install oracle-java16-installer
Next, Read the License terms and press TAB to highlight the 'Ok' button and press ENTER.
Next, select 'Yes' to accept the license agreement.
The installation of Oracle Java will continue and finally, come to a close. To verify the version of Java installed, run the command:
$ java -version
$ javac -version
[Need assistance in Installing Java Software on Debian Linux system ? We can help you. ]