Update
sudo apt update
sudo apt upgrade
Install
sudo apt install curl gnupg ca-certificates
Download and save the Azul GPG key
curl -s https://repos.azul.com/azul-repo.key | sudo gpg --dearmor -o /usr/share/keyrings/azul.gpg
Add the Azul repository to our list of sources
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | sudo tee /etc/apt/sources.list.d/zulu.list
Updated
sudo apt update
Install OpenJDK
sudo apt install zulu21-jdk-headless
Verify
java --version