sudo nano /etc/apt/sources.list
# add line:
deb http://security.debian.org/debian-security bullseye-security main
# update
sudo apt-get update
# install
sudo apt-get install openjdk-17-jdk
# test it
cd /usr/lib/jvm/java-17-openjdk-arm64/bin
./javac -version
# make a link to it
sudo ln -s /usr/lib/jvm/java-17-openjdk-arm64 /opt/jdk17
# test again
/opt/jdk17/bin/javac -version