About Me

header ads

[Guide] available Java 14: here's how to install it on Ubuntu, Debian and derivatives

Java-logo

Oracle has released Java 14. The news through the official blog is Sharat Chander, product managers. In this guide, we see how to install Oracle Java 14 on Ubuntu, Debian, and all its derivatives. We will use the APT package manager, which will allow us to automate the download and complete the operation by following a few simple steps.

Java 14, for the most demanding
JDK 14 includes a number of new features that will improve developer productivity.

Java 14 is further confirmation of the benefits offered by the semi-annual release, which allows developers to access features that they would otherwise have waited for years.

these are the words of Georges Saab, vice president of development, Java Platform, Oracle.

Obviously, this is a guide intended for those with special needs, related to programming with this type of language, whose previous versions are still widely used in many business realities. Among the new features of this release is compatibility with the expression switch and numerous bug fixes, for a complete list just refer to the official notes. We also remind you that Oracle allows you to use Java for free, without paying the license, only in non-productive areas.

java-14-installer-license

The installer version, based on the Web Upd8 Java package, allows us to avoid manually downloading the file from the official website. However, we have to follow different steps according to the type of distribution and, at the end of the guide, the steps are also reported in case the automatic download is not successful. When the installation starts, you will have to accept the license.

Let's start with the case in which we are on a derivative distribution of Ubuntu and let's add the following PPA.

sudo add-apt-repository ppa:linuxuprising/java sudo apt update

Then we proceed with the installation

sudo apt install oracle-java14-installer

Note: for Linux Mint and other derivatives of Ubuntu, or Debian, we must then add a step that allows us to install the environment variable correctly and set version 14 as the default:

sudo apt install oracle-java14-set-default

We then proceed to restart the system and the installation will be complete!
If instead we use Debian, and we have not enabled add-apt-repository, we type from the terminal:

su -
echo "deb http://ppa.launchpad.net/linuxuprising/java/ubuntu focal main" | tee /etc/apt/sources.list.d/linuxuprising-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 73C3DB2A
apt-get update
apt-get install oracle-java14-installer
exit

After finishing the procedure, you can check which version of Java is set as default in the system, by running the java -version command, in case you no longer want to have this version set, type:

sudo apt remove oracle-java14-set-default

What if the download is not successful?
In the event that during the installation the automatic download is not successful, we will obviously have to proceed with the manual download by following this link. Next, we open the terminal in the folder where the download was performed and give the commands:

mkdir /var/cache/oracle-jdk14-installer
mv jdk-14_linux-x64_bin.tar.gz /var/cache/oracle-jdk14-installer

We then proceed with the steps indicated above, instead of automatically downloading Java 14, the installer will use the file just copied.

Post a Comment

0 Comments