In this article, We are going to perform How to Install Zulu OpenJDK Version 11 on Ubuntu 20.04/18.04/16.04 LTS
Table of Contents
Introduction
Zulu is free and open source community distributions for OpenJDK. It has Zulu OpenJDK 6, 7, 8, 9, 10, 11, 12, 13, 14, and 15 EA which support for Linux, Windows, Solaris , Mac OS, etc., OS types.
Prerequisites
- Ubuntu Server 20.04/18.04/16.04 LTS
- SSH access with sudo privileges
Step #1: Import the Zulu Repository Key for Ubuntu
First add the Zulu Repository Key for Ubuntu using below commands,
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
Output:
Executing: /tmp/apt-key-gpghome.PgxUnr6sbZ/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 gpg: key B1998361219BD9C9: public key "Azul Systems, Inc. (Package signing key.) <[email protected]>" imported gpg: Total number processed: 1 gpg: imported: 1
Step #2: Add Zulu apt Repository
Next add Zulu apt Repository using below command
sudo apt-add-repository 'deb http://repos.azulsystems.com/ubuntu stable main'
update the system package
sudo apt update
Step #3: Install Zulu OpenJDK Version 11 on Ubuntu
Now Install Zulu OpenJDK Version 11 on Ubuntu
sudo apt install zulu-11
if you want to install specific version of Zulu OpenJDK use below command
$ sudo apt install zulu-<Version>
Step #4: Verify Java Version
java -version
openjdk version "11.0.7" 2020-04-14 LTS OpenJDK Runtime Environment Zulu11.39+15-CA (build 11.0.7+10-LTS) OpenJDK 64-Bit Server VM Zulu11.39+15-CA (build 11.0.7+10-LTS, mixed mode)
Step #5: Setting the JAVA_HOME Environment Variables for Zulu OpenJDK Version 11
sudo nano /etc/environment
For Zulu OpenJDK 11 version Java is installed at /usr/lib/jvm/zulu-11-amd64 location
JAVA_HOME="/usr/lib/jvm/zulu-11-amd64"
Load the environment variable using below command
source /etc/environment
Lets verify JAVA_HOME variable
echo $JAVA_HOME
Output:
/usr/lib/jvm/zulu-11-amd64
If you seeing output like above then we have successfully set up the Java Home on Ubuntu, Setting the JAVA_HOME Environment Variables for Zulu OpenJDK Version 11.
Conclusion:
In this article, We have covered How to Install Zulu OpenJDK Version 11 on Ubuntu 20.04 LTS
Related Articles:
How to Install Java on Ubuntu 20.04 LTS
How to Install Gradle on Ubuntu 20.04/18.04/16.04 LTS
Reference
Hello, “java –version” command should be “java –version”.
Thanks for update.
Thanks you very much for this post, I was able to run react native with this 🙂
Thanks for your feedback.
This post is so helpful, thanks very much for sharing it!!
Thanks for your feedback.