Add Java 25 to build matrix#294
Merged
sbesson merged 9 commits intoglencoesoftware:masterfrom Feb 18, 2026
Merged
Conversation
Gradle >= 9.1.0 is required to run Java 25 builds, but 9.0.0 dropped support for Java < 17.
sbesson
requested changes
Jan 30, 2026
Member
sbesson
left a comment
There was a problem hiding this comment.
The proposed changes are consistent with the roadmap for the upcoming Java support across these libraries discussed recently i.e.:
- Java 11 is the minimal runtime requirement
- Java 17 is the minimal build requirement
- Gradle 9.x can be used for compiling across all supported LTS versions
Testing the built artifacts with different local Java versions works as expected
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % jenv local 1.8
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % ./bin/bioformats2raw test.fake test.zarr
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/glencoesoftware/bioformats2raw/Converter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:621)
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % jenv local 11
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % rm -r test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % ./bin/bioformats2raw test.fake test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % jenv local 17
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % rm -r test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % ./bin/bioformats2raw test.fake test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % jenv local 21
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % rm -r test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % ./bin/bioformats2raw test.fake test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % jenv local 25
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % rm -r test.zarr
sbesson@Sebastien-GS-MacBook-Pro-2025 bioformats2raw-0.12.0-SNAPSHOT % ./bin/bioformats2raw test.fake test.zarr
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by nu.pattern.OpenCV$LocalLoader in an unnamed module (file:/Users/sbesson/Downloads/bioformats2raw-0.12.0-SNAPSHOT/lib/opencv-4.7.0-0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
https://github.com/glencoesoftware/bioformats2raw?tab=readme-ov-file#requirements should also be updated to capture the new requirements.
sbesson
approved these changes
Jan 30, 2026
erindiel
approved these changes
Feb 17, 2026
Member
erindiel
left a comment
There was a problem hiding this comment.
Approving based on clarity of updated requirements in README and successful conversion in local Java 17 environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raised by @mabruce.
This is one approach to including Java 25 builds. Unfortunately, there is no Gradle version that can be run on both Java 8 and Java 25. See https://docs.gradle.org/current/userguide/compatibility.html. This PR as written keeps the existing Gradle wrapper, but separately downloads and installs 9.2.1 for the Java 25 build only. I feel like there must be some nicer way to do that, so other ideas welcome.
Compatibility with both Gradle 8.x.x and 9.x.x required a few adjustments to the
build.gradle, but that doesn't seem to be a problem. It's probably worth double-checking build logs and artifacts though to make sure everything looks reasonable.I'd imagine that whatever we settle on here can be applied to other repositories, so this is mostly a place to start the discussion and not necessarily something I expect to be merged as-is.