How do I install OpenJDK 16

I have tried many tutorials, but none of them worked. I am using this file: from here:


on our latest Bullseye image and DietPi v7.5, we will install OpenJDK -17

 Mode: Installing Java JRE: OpenJDK Runtime Environment

[ INFO ] DietPi-Software | APT install for: ca-certificates-java openjdk-17-jre-headless, please wait... (1/2)

 Mode: Installing Java JDK: OpenJDK Development Kit

[ INFO ] DietPi-Software | APT install for: openjdk-17-jdk-headless, please wait...

Another simple way on how to install OpenJDK 16 is to follow official instruction on AdoptOpenJDK web site

root@DietPi3:~# java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode)

This worked, thank you!

ok perfect