Recently, Oracle announced that Java 14 (or Oracle JDK 14) was publicly available. If you want to do the latest experimentation or development, you can try installing Java 14 on your 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 the link:
- Instanceof pattern matching
- Records
- Text Blocks
In addition to the preview feature, it also contains some improvements and additions. In the news, they also mentioned other improvements:
In addition, the latest Java release adds Java language support for Switch expressions, new apis for continuous monitoring of JDK Flight Recorder data, extending low-latency ZGC to macOS and Windows, And added to the Incubator module, stand-alone Java application packaging, as well as a new external memory access API for safe and efficient access to memory outside the Java heap.
Of course, if you want to dig into the details, then you should check the official announcement.
In this tutorial, I will show you an easy way to install Java 14 on an Ubuntu system. Read on.
** Note: ** If you choose to use Oracle Java 11 or later, you should be aware of the new Oracle Technology Network license to understand how it affects individual users, developers, and commercial organizations. Typically, they are free for development and testing, but not for production.
How do I install Java 14 on Ubuntu Linux?
For reference, I have successfully installed OpenJDK 11 Pop! By default. It was successfully installed on _OS 19.10.
Here, we’ll use the Java 14 installer for Linux Uprising (originally based on the WebUpd8 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
Copy the code
This should be done. If you want to make it default, you can type the following command:
sudo apt install oracle-java14-set-default
Copy the code
It’s important to note 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 by following the detailed instructions in Linux Uprising.
conclusion
Of course, these will bring the latest features, and if you don’t want to break the old environment, you may want to stick with Java 11. If you want to experiment with an understanding of the risks, keep trying!
Let me know what you think of Java 14 in the comments below.
Via: itsfoss.com/java-14-ubu…
By Ankush Das (lujun9972
This article is originally compiled by LCTT and released in Linux China