Hi Team,
We are currently using Apache Flink 1.20.2 and planning to upgrade to Java 21 for our next release. But Flink’s Docker Hub does not offer a Flink 1.20.2 image with Java 21, only versions up to Java 17 are available. What are our options to move forward?
a
Andreas Bube
08/29/2025, 9:28 AM
Java 17 is the latest supported Java version for Flink 1.20. Java 21 is only supported from Flink version 2 and onwards
If you click the link to the Jira ticket you'll see that the listed fix version is 2.0.0. You can try to roll your own Docker image with Java 21, but I would advice against it. I guess there's a good reason Java 21 isn't supported by Flink 1.20. I guess required changes have not been back-ported, and that you might run into issues at run-time.