I wanted to clarify what is the recommended Java version for flink development and builds.
The docs state that Java 8 support is deprecated and Java 11 is recommended for building. (https://github.com/apache/flink/blob/master/docs/content/docs/flinkDev/building.md)
However this page on setting up a dev environment for flink specifies Java 8 (https://cwiki.apache.org/confluence/display/FLINK/Setting+up+a+Flink+development+environment)
The wiki page was last updated in late 2021, so I assumed it just a case of documentation that hadn't been updated yet (I'd be happy to help with that).
So I set up my environment with Java 11 and it successfully builds flink.
However, I also see latest discussion on the dev list the last 2 days stating binary releases must be built with Java 8.
Can someone please clarify?
m
Martijn Visser
10/18/2023, 1:38 PM
We currently require that releases are built with Java 8. You can run Flink either as Java 8 or Java 11 (and with 1.18, also in Java 17). Java 8 is deprecated and hopefully in the next release we can move Flink to be fully on Java 11 and Java 17
s
Swapnal Varma
10/18/2023, 2:08 PM
Thank you! That makes it very clear.
Swapnal Varma
10/18/2023, 2:09 PM
So for developing flink itself, and building it to test the changes before contributing, the recommended setup is Java 11?
m
Martijn Visser
10/18/2023, 6:24 PM
The CI for PRs tests on Java 8, all merged are changed every night on Java 11 too. But I do all my development in Java 11