Method for installing Oracle Java 14 on Ubuntu Linux

  • 2021-07-26 09:14:11
  • OfStack

Recently, Oracle announced that Java 14 (or Oracle JDK 14) is publicly available. If you want to do the latest experiment or development, you can try installing Java 14 on Linux system.

The Oracle JDK 14 (or Java 14 for short) release includes several new features if you want to preview them. I have added a link:

Pattern Matching of instanceof Records Text Blocks

In addition to the preview function, it also contains 1 improvements and additions. In the news, they also mentioned other improvements:

In addition, the latest version of Java adds support for switch expressions in Java language, new API for continuous monitoring of JDK, Flight and Recorder data, low latency zgc is extended to macOS and Windows, and added to incubator module, independent Java application packaging, and new external memory access API for safe and effective access to external memory of Java heap.

Of course, if you want to learn more about the details, you should check the official announcement.

In this tutorial, I'll show you an easy way to install Java 14 on an Ubuntu system. Please keep reading.

Note: If you choose to use Oracle Java 11 or later, you should learn about the new Oracle Technology Network License Agreement to understand how it affects individual users, developers, and business organizations. Generally, they can be used for development and testing free of charge, but they cannot be used in production environment.

How do I install Java 14 on Ubuntu Linux?

For reference, I have successfully installed Pop for OpenJDK 11 by default! It was successfully installed on _ OS 19.10.

Here, we will use the Java 14 installer for Linux Uprising (originally based on the WebUpd 8 Java package).

Simply enter the following command in the terminal to install:


sudo add-apt-repository ppa:linuxuprising/java
sudo apt update
sudo apt install oracle-java14-installer

This should be done. If you want to set it as the default, you can enter the following command:

sudo apt install oracle-java14-set-default

It is worth noting that this only applies to Ubuntu-based distributions. If you want to install it on Debian and other Linux distributions, you can also install Java 14 according to the detailed guidelines in Linux Uprising.

Summarize

Of course, these will bring the latest features. If you don't want to break the original environment, you may want to continue to use Java 11. If you want to experiment with an understanding of the risks, keep trying!


Related articles: