How to install Zulu Open JDK 12 on Debian GNU/Linux 9 (Stretch)?

How to install Zulu Open JDK 12 on Debian GNU/Linux 9 (Stretch)?

Zulu Enterprise™ is a commercialized build of OpenJDK™ and is certified compatible and compliant with the Java SE specification. The 100% open source Zulu JDK is simple to install and requires no coding changes to your Java application. Installing Zulu Java Development Kit 12 in Debian Linux 9 is really a simple. Here are the step by step procedure to install the Zulu Open JDK in Debian Linux 9 Operating System. – by www.azul.com

download JDK

You can download the Zulu Open JDK .tar file from Azul official site. https://www.azul.com/downloads/zulu-community/

Open the terminal and create a new “jvm” folder under /usr/lib directory.

sudo mkdir /usr/lib/jvm

Then change the directory /usr/lib/jvm.

cd /usr/lib/jvm/
Create a new JVM directory

wget download

Now, download the .tar file JDK by using wget command.

sudo wget https://cdn.azul.com/zulu/bin/zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz

After download the file, then extract it.

sudo tar -xvzf zulu12.3.11-ca-jdk12.0.2-linux_x64.tar.gz

set environment and java_home Path

Open the nano editor to set the JAVA Path and JAVA_HOME path by using below command.

sudo nano /etc/environment

Add below lines into your text editor after executing the nano command.

PATH="/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin"
JAVA_HOME="/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64"

Then, save the file. Next step is inform to Linux where Java is located in that system.

update alternatives

Execute the following commands to set the Java alternatives in Linux machine.

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin/java" 0
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin/javac" 0
sudo update-alternatives --set java /usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin/java
sudo update-alternatives --set javac /usr/lib/jvm/zulu12.3.11-ca-jdk12.0.2-linux_x64/bin/javac

To verify the setup execute the following commands and it will print the location of the java and javac path.

update-alternatives --list java 
update-alternatives --list javac 

check java version

Restart the computer or logout and login once again. After that, execute the following command to check the java version.

java -version

You can see the following output in the console window.

openjdk version "12.0.2" 2019-07-16

OpenJDK Runtime Environment Zulu12.3+11-CA (build 12.0.2+3)

OpenJDK 64-Bit Server VM Zulu12.3+11-CA (build 12.0.2+3, mixed mode, sharing)
Advertisements

How to install Zulu Open JDK 12 on Windows 10?

How to install Zulu Open JDK 12 on Windows 10?

Azul Systems, Inc., is a private company that develops a run time platforms for executing the Java based applications.

Zulu Enterprise™ is a commercialized build of OpenJDK™ and is certified compatible and compliant with the Java SE specification. The 100% open source Zulu JDK is simple to install and requires no coding changes to your Java application. Installing Zulu Java Development Kit 12 in Debian Linux 9 is really a simple. Here are the step by step procedure to install the Zulu Open JDK in Debian Linux 9 Operating System. – by www.azul.com

oracle license update

Oracle Corporation updates the JDK license that permits only certain uses, such as personal use and development use at no cost. For commercial use no longer support without cost.

where we can download the ZULU Open jdk?

We can download the Zulu Open Java Development Kit from the official AZUL site. The official site URL has been given below.

https://www.azul.com/downloads/zulu-community/

Select Java version is 12 and Operating System is Windows 64 bit on the Zulu Community downloads section. Then click the .zip file link to download the Zulu Open JDK.

ZULU Community Downloads

After download the zip file and extract it. After extract the zip file, copy the file location and set the environment variable path for Zulu Open JDK.

Zulu Open JDK Zip file
Zulu Open JDK after extract the ZIP file

set environment variable

Follow the below steps to set the environment variable for Zulu Open JDK. The steps are given below

#1. Go to the My Computer –> Properties

My Computer –> Properties

#2. Open the Environment Variable window by clicking the Advanced System Settings –> System Properties –> Environment Variables…

Environment Variables

#3. Select the System variable “Path” and click the “Edit” button.

System variables

#4. Click the “New” button on the edit environment variable window and the add the Zulu Open JDK extracted file location up to the bin folder and then click “OK” button. In my system, I have downloaded and extracted the JDK file on the following location up to bin folder.

C:\softwares\zulu12.3.11-ca-jdk12.0.2-win_x64\bin
Zulu Open JDK Path

set java home path

To set the Java home path environment variable, follow the below steps.

#1. Click “New” button on the System variable window and provide the variable name is “JAVA_HOME” and variable value is Zulu Open JDK file extracted path. In my system, I have download and extracted the zip file on the following location.

C:\softwares\zulu12.3.11-ca-jdk12.0.2-win_x64
JAVA HOME PATH

#2. Click “OK” button on all opened windows and open the new command prompt to execute the following command to check the java version. The Java version should be open JDK 12.0.2 and run time environment is Zulu 12.

java -version
Java version

Zulu Open JDK installation has been done on Windows 10.