In this article, We are going to perform How to Install Zulu OpenJDK Version 11 on Ubuntu 20.04/18.04/16.04 LTS
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.) <pki-signing@azulsystems.com>" 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
To check the Installed Zulu java version
java -version
Output:
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
To define the environment variable open the below file:
sudo nano /etc/environment
Paste the below variable into the file:
For Zulu OpenJDK 11 version Java is installed at /usr/lib/jvm/zulu-11-amd64 location/etc/environment
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.
İlk Yorumu Siz Yapın