On Tue, Apr 22, 2025 at 6:02 PM sebb <seb...@gmail.com> wrote: > > On Tue, 22 Apr 2025 at 22:02, Samael Bate <singingb...@hotmail.com> wrote: > > > > The build info says these artifacts were built with Java version: 23.0.2 > > > > That'll surely cause issues with users on earlier JDKs. Shouldn't releases > > be built with the lowest supported JDK for maximum compatibility?
It's safer to build with a modern JDK using the compiler's release flag because it gives you both the correct byte codes and class file version AND checks that you are only calling APIs available on that target platform version. On older JDKs, you are forced to use antique tooling like AnimalSniffer to make sure you're only calling APIs that match the target platform. I'm not even sure AnimalSniffer is updated since it's been made obsolete by the JDK compiler's release flag. Sebb's examples below show that the class file versions match Java 8. HTH, Gary > > I just unpacked commons-collections4-4.5.0.jar and get: > > $ javap -v org/apache/commons/collections4/Trie.class | head > ... > minor version: 0 > major version: 52 > > which I believe is compatible with Java 1.8 > > Also: > > $ file org/apache/commons/collections4/Trie.class > org/apache/commons/collections4/Trie.class: compiled Java class data, > version 52.0 (Java 1.8) > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org