31 C
Texas
angeloma
Senior Writer and partner

How to install Oracle Java 16 on Debian 10

Hello, friends. We know that Java is one of the most popular programming languages and now it’s version 16. So in this post, you’ll learn how to install Oracle Java 16on Debian 10

Java is one of the preferred languages by many developers but it is also necessary to run other very important software. In this sense, Oracle from time to time releases a new version that includes good news.

So, if you are a developer and want to try Java 16 on Debian 10, this post will help you with that.

Install Oracle Java 16 on Debian 10

There is a package created by Linux Uprising that facilitates the whole process. This package is originally created for Ubuntu but we can also use it in Debian.

- Advertisement -

In a very brief way, the package is an installer that takes care of downloading the Oracle binaries. Also, it extracts them and copies them in the appropriate directory and everything by us.

So, open a terminal or log in with SSH and update the distribution

sudo apt update
sudo apt upgrade

Then, download the package that will help us with the installation:

wget -c https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-installer_16-1~linuxuprising0_amd64.deb -O java.deb
--2021-03-17 23:36:18--  https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-installer_16-1~linuxuprising0_amd64.deb
 Resolving launchpad.net (launchpad.net)… 2001:67c:1560:8003::8004, 2001:67c:1560:8003::8003, 91.189.89.223, …
 Connecting to launchpad.net (launchpad.net)|2001:67c:1560:8003::8004|:443… connected.
 HTTP request sent, awaiting response… 303 See Other
 Location: https://launchpadlibrarian.net/528398753/oracle-java16-installer_16-1~linuxuprising0_amd64.deb [following]
 --2021-03-17 23:36:19--  https://launchpadlibrarian.net/528398753/oracle-java16-installer_16-1~linuxuprising0_amd64.deb
 Resolving launchpadlibrarian.net (launchpadlibrarian.net)… 2001:67c:1560:8003::8008, 2001:67c:1560:8003::8007, 91.189.89.229, …
 Connecting to launchpadlibrarian.net (launchpadlibrarian.net)|2001:67c:1560:8003::8008|:443… connected.
 HTTP request sent, awaiting response… 200 OK
 Length: 33962 (33K) [application/x-debian-package]
 Saving to: ‘java.deb’
 java.deb                                   100%[=====================================================================================>]  33.17K  --.-KB/s    in 0.02s   
 2021-03-17 23:36:19 (1.50 MB/s) - ‘java.deb’ saved [33962/33962]

When the download is complete, it must be run or installed:

sudo apt install ./java.deb
Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 Note, selecting 'oracle-java16-installer' instead of './java.deb'
 The following additional packages will be installed:
   binutils binutils-common binutils-x86-64-linux-gnu java-common libbinutils
 Suggested packages:
   binutils-doc binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho | ttf-sazanami-mincho
   ttf-arphic-uming firefox | firefox-2 | iceweasel | mozilla-firefox | iceape-browser | mozilla-browser | epiphany-gecko | epiphany-webkit | epiphany-browser | galeon
   | midbrowser | moblin-web-browser | xulrunner | xulrunner-1.9 | konqueror | chromium-browser | midori | google-chrome
 Recommended packages:
   gsfonts-x11 oracle-java16-set-default
 The following NEW packages will be installed:
   binutils binutils-common binutils-x86-64-linux-gnu java-common libbinutils oracle-java16-installer
 0 upgraded, 6 newly installed, 0 to remove and 5 not upgraded.
 Need to get 4,446 kB/4,480 kB of archives.
 After this operation, 28.4 MB of additional disk space will be used.
 Do you want to continue? [Y/n]

And there the whole process will begin

First, accept the license terms:

1.- License terms
1.- License terms
2.- Accept the license terms
2.- Accept the license terms

And then the process will continue. In the end, you will see an output like the following

Now to make this version of Java the default you have to download another package:

wget https://launchpad.net/~linuxuprising/+archive/ubuntu/java/+files/oracle-java16-set-default_16-1~linuxuprising0_all.deb -O default.deb

And install it:

sudo apt install ./default.deb

Now yes, check the Java version of the system to see if everything went well:

java --version

Output:

java 16 2021-03-16
 Java(TM) SE Runtime Environment (build 16+36-2231)
 Java HotSpot(TM) 64-Bit Server VM (build 16+36-2231, mixed mode, sharing)

So, enjoy it.

Conclusion

Java 16 has been released with many new features and this makes many want to leap an old version to this one. Therefore, in this post, you could learn how to install it in Ubuntu.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

2 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article