Should I move my Java library from JDK 11+ to JDK 21+?
I am genuinely confused at this point 😭
I've been reading a lot of posts and tech articles about companies/projects migrating from older Java versions like JDK 8/11 to JDK 21+.
And now I'm stuck with the same question for my own Java library.
On one side, keeping JDK 11+ gives better compatibility. There are still a lot of projects out there running on older Java versions, and since this is a library, compatibility matters because I'm basically deciding the minimum JDK required for everyone who wants to use it.
On the other side, JDK 21+ gives a much more modern Java baseline, newer APIs/features, and potentially better JVM performance.
Also, most of the migration stories I'm finding are from large companies / enterprise applications, which makes me wonder if the same reasoning actually applies to an open-source Java library. Even if big companies are migrating to JDK 21+, their interviews and hiring expectations are also increasingly centered around JDK 21 and the major changes since JDK 8, which makes the whole situation even more confusing for someone learning/maintaining Java.
So I'm trying to understand what people actually do in real-world Java libraries today.
Would you help me decide the minimum at JDK 11+ or move to JDK 21+?
And if you maintain a Java library yourself:
- How do you decide the minimum supported JDK?
- How important is JDK 11 compatibility today?
- Is JDK 21 actually worth making the minimum?
- Would you only raise the minimum JDK in a major release?
I would really appreciate some practical opinions because I am totally fed up with reading migration articles . Please it's more likely a great help for me.
https://github.com/Chaos-vy/ChaosTree
Reached conclusion:
I read through the recent JLS and JVM changes. JLS got new features and reduced boilerplate, while JVM got some massive improvements.
But since ChaosTree is zero-dependency, I don't have the same CVE/dependency issue.
So for now I'm wrapping it around JDK 11+ and letting users run it on newer JDKs if they want.
Thanks everyone for dropping your thoughts