Gerrit 3.10 it will drop support for Java 11 and require Java 17+:
https://www.gerritcodereview.com/3.10.html#dropped-support-for-java-11
Our servers run Bullseye with Java 11 and Java 17 is available https://packages.debian.org/search?keywords=openjdk-17-jdk&searchon=names&suite=all§ion=all
A note by Matthias Sohn, upstream maintainer ( https://groups.google.com/g/repo-discuss/c/pSGsHbi2TEw/m/GMuXM8zIAAAJ ):
I think 3.8 should work on Java 17. AFAIK the first release fully supporting Java 17 was 3.6, see https://www.gerritcodereview.com/3.6.html.
Though 3.6 and 3.7 required this configuration on Java 17
https://issues.gerritcodereview.com/issues/40014855This was fixed in 3.8.1 by https://gerrit-review.googlesource.com/c/gerrit/+/374575.