From 84550999f5b8042ea9c788e9d69192e85db326b7 Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Mon, 11 May 2026 10:19:42 -0500 Subject: [PATCH 1/5] Require Java 11 at runtime, build on Java 21/25 --- .github/workflows/ant.yml | 10 +++++----- .github/workflows/maven.yml | 18 +++++++++--------- .github/workflows/release.yml | 6 +++--- README.md | 2 +- ant/java.xml | 2 +- .../bio-formats-plugins/build.properties | 2 +- .../src/loci/plugins/util/LibraryChecker.java | 4 ++-- components/bio-formats-tools/build.properties | 2 +- components/forks/turbojpeg/build.properties | 2 +- components/formats-api/build.properties | 2 +- components/formats-bsd/build.properties | 2 +- components/formats-gpl/build.properties | 2 +- components/test-suite/build.properties | 2 +- config/BFSourceFormat.xml | 6 +++--- pom.xml | 8 ++++---- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index 7801186b51a..b67508c604f 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -7,13 +7,13 @@ jobs: build: strategy: matrix: - java: [8, 11, 17] + java: [21, 25] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java }} distribution: 'zulu' @@ -23,8 +23,8 @@ jobs: ant docs - name: Upload artifacts # upload just one set of artifacts for easier PR review - if: matrix.os == 'ubuntu-latest' && matrix.java == '8' - uses: actions/upload-artifact@v4 + if: matrix.os == 'ubuntu-latest' && matrix.java == '21' + uses: actions/upload-artifact@v7 with: path: artifacts/ retention-days: 30 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1adec5b08df..1abc082f330 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - java: [8, 11, 17] + java: [21, 25] os: [ubuntu-latest, windows-latest, macos-latest] include: - java: '21' @@ -22,9 +22,9 @@ jobs: env: maven_commands: install # default is install steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK ${{ matrix.java }} - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: java-version: ${{ matrix.java }} distribution: 'zulu' @@ -36,7 +36,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Retrieve version id: get_version run: | @@ -51,9 +51,9 @@ jobs: echo server='ome.releases' >> $GITHUB_OUTPUT fi - name: Set up Repository - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - java-version: 8 + java-version: 21 distribution: 'zulu' server-id: ${{ steps.set_server.outputs.server }} server-username: MAVEN_USERNAME @@ -69,7 +69,7 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Retrieve version id: get_version run: | @@ -84,9 +84,9 @@ jobs: echo server='ome.releases' >> $GITHUB_OUTPUT fi - name: Set up Repository - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - java-version: 8 + java-version: 21 distribution: 'zulu' server-id: ${{ steps.set_server.outputs.server }} server-username: MAVEN_USERNAME diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef2c8223692..974b92babd5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,11 +9,11 @@ jobs: name: Release artifacts runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Set up JDK - uses: actions/setup-java@v4 + uses: actions/setup-java@v5 with: - java-version: 8 + java-version: 21 distribution: 'zulu' - name: Build artifacts run: | diff --git a/README.md b/README.md index 7e2512fcb68..a32d1de7104 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ following before submitting a pull request: * verify that the branch merges cleanly into ```develop``` * verify that the branch compiles with the ```clean jars tools``` Ant targets * verify that the branch compiles using Maven - * verify that the branch does not use syntax or API specific to Java 1.8+ + * verify that the branch does not use syntax or API specific to Java > 11 * run the unit tests (```ant test```) and correct any failures * test at least one file in each affected format, using the ```showinf``` command diff --git a/ant/java.xml b/ant/java.xml index f70171783cb..aa5de1b7b18 100644 --- a/ant/java.xml +++ b/ant/java.xml @@ -272,7 +272,7 @@ your FindBugs installation's lib directory. E.g.: diff --git a/components/bio-formats-plugins/build.properties b/components/bio-formats-plugins/build.properties index b7ab554a545..1c4d0761856 100644 --- a/components/bio-formats-plugins/build.properties +++ b/components/bio-formats-plugins/build.properties @@ -9,7 +9,7 @@ component.name = bio-formats_plugins component.jar = bio-formats_plugins.jar component.version = ${release.version} -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = diff --git a/components/bio-formats-plugins/src/loci/plugins/util/LibraryChecker.java b/components/bio-formats-plugins/src/loci/plugins/util/LibraryChecker.java index 470f40e5761..541e0ac9ae7 100644 --- a/components/bio-formats-plugins/src/loci/plugins/util/LibraryChecker.java +++ b/components/bio-formats-plugins/src/loci/plugins/util/LibraryChecker.java @@ -106,9 +106,9 @@ public static void checkLibrary(String className, /** Checks for a new enough version of the Java Runtime Environment. */ public static boolean checkJava() { - if (!IJ.isJava18()) { + if (IJ.javaVersion() < 11) { IJ.error("Bio-Formats Plugins", - "Sorry, the Bio-Formats plugins require Java 1.8 or later."); + "Sorry, the Bio-Formats plugins require Java 11 or later."); return false; } return true; diff --git a/components/bio-formats-tools/build.properties b/components/bio-formats-tools/build.properties index dd2fe911cdf..c6c93b8a5c2 100644 --- a/components/bio-formats-tools/build.properties +++ b/components/bio-formats-tools/build.properties @@ -9,7 +9,7 @@ component.name = bio-formats-tools component.jar = bio-formats-tools.jar component.version = ${release.version} -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = diff --git a/components/forks/turbojpeg/build.properties b/components/forks/turbojpeg/build.properties index 6ee51dff3bf..1a98dd75ba7 100644 --- a/components/forks/turbojpeg/build.properties +++ b/components/forks/turbojpeg/build.properties @@ -9,7 +9,7 @@ component.name = turbojpeg component.jar = turbojpeg.jar component.version = 1.2.1 -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = diff --git a/components/formats-api/build.properties b/components/formats-api/build.properties index ef21626470a..d0de4e5d610 100644 --- a/components/formats-api/build.properties +++ b/components/formats-api/build.properties @@ -9,7 +9,7 @@ component.name = formats-api component.jar = formats-api.jar component.version = ${release.version} -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = diff --git a/components/formats-bsd/build.properties b/components/formats-bsd/build.properties index 11e51dfc596..cdca8e5a546 100644 --- a/components/formats-bsd/build.properties +++ b/components/formats-bsd/build.properties @@ -9,7 +9,7 @@ component.name = formats-bsd component.jar = formats-bsd.jar component.version = ${release.version} -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = loci/formats/bio-formats-logo.png \ diff --git a/components/formats-gpl/build.properties b/components/formats-gpl/build.properties index d49efc442ad..4baa8058ecd 100644 --- a/components/formats-gpl/build.properties +++ b/components/formats-gpl/build.properties @@ -9,7 +9,7 @@ component.name = formats-gpl component.jar = formats-gpl.jar component.version = ${release.version} -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = loci/formats/bio-formats-logo.png \ diff --git a/components/test-suite/build.properties b/components/test-suite/build.properties index 40f4d1c502c..89b7c262585 100644 --- a/components/test-suite/build.properties +++ b/components/test-suite/build.properties @@ -9,7 +9,7 @@ component.name = bio-formats-testing-framework component.jar = bio-formats-testing-framework.jar component.version = 1.0.0 -component.java-version = 1.8 +component.java-version = 11 component.deprecation = true component.resources-bin = diff --git a/config/BFSourceFormat.xml b/config/BFSourceFormat.xml index d63c29118d8..05cd365e85a 100644 --- a/config/BFSourceFormat.xml +++ b/config/BFSourceFormat.xml @@ -48,7 +48,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -237,7 +237,7 @@ - + diff --git a/pom.xml b/pom.xml index d542ef9e7d6..28bfb5adfd7 100644 --- a/pom.xml +++ b/pom.xml @@ -211,11 +211,11 @@ maven-compiler-plugin 3.14.0 - + - 8 - 8 - 8 + 11 + 11 + 11 From f5e0980c09d26d72568dd7719fe0e33e51bd7c0d Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Mon, 11 May 2026 10:29:35 -0500 Subject: [PATCH 2/5] Update Java API links --- ant/java.xml | 2 +- components/bundles/bioformats_package/build.xml | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ant/java.xml b/ant/java.xml index aa5de1b7b18..d061a6d48b2 100644 --- a/ant/java.xml +++ b/ant/java.xml @@ -293,7 +293,7 @@ your FindBugs installation's lib directory. E.g.: Bio-Formats]]> - + diff --git a/components/bundles/bioformats_package/build.xml b/components/bundles/bioformats_package/build.xml index e23919bdd2a..b56d5a9d219 100644 --- a/components/bundles/bioformats_package/build.xml +++ b/components/bundles/bioformats_package/build.xml @@ -41,7 +41,7 @@ Type "ant -p" for a list of targets. Bio-Formats]]> - + diff --git a/pom.xml b/pom.xml index 28bfb5adfd7..6830241e2c4 100644 --- a/pom.xml +++ b/pom.xml @@ -279,7 +279,7 @@ false - http://docs.oracle.com/javase/8/docs/api/ + http://docs.oracle.com/javase/11/docs/api/ http://jenkins.imagej.net/job/ImageJ1-javadoc/javadoc/ From bf887e4e495bef3b91f0cd96381b1fd96e959364 Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Wed, 13 May 2026 11:50:05 -0500 Subject: [PATCH 3/5] Update maven-javadoc-plugin and fix Java 11 API link --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6830241e2c4..9fa6a04eb99 100644 --- a/pom.xml +++ b/pom.xml @@ -60,7 +60,7 @@ 3.49.1.0 - 3.0.1 + 3.12.0 UTF-8 @@ -278,8 +278,8 @@ http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5101868 --> false - - http://docs.oracle.com/javase/11/docs/api/ + + https://docs.oracle.com/en/java/javase/11/docs/api/ http://jenkins.imagej.net/job/ImageJ1-javadoc/javadoc/ From 2df7c284dfae78b56d3fac7c7c5d873a143a0101 Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Wed, 13 May 2026 12:02:20 -0500 Subject: [PATCH 4/5] Fix Java 11 API links for ant --- ant/java.xml | 2 +- components/bundles/bioformats_package/build.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ant/java.xml b/ant/java.xml index d061a6d48b2..40ffb14a30b 100644 --- a/ant/java.xml +++ b/ant/java.xml @@ -293,7 +293,7 @@ your FindBugs installation's lib directory. E.g.: Bio-Formats]]> - + diff --git a/components/bundles/bioformats_package/build.xml b/components/bundles/bioformats_package/build.xml index b56d5a9d219..9eb5d34da23 100644 --- a/components/bundles/bioformats_package/build.xml +++ b/components/bundles/bioformats_package/build.xml @@ -41,7 +41,7 @@ Type "ant -p" for a list of targets. Bio-Formats]]> - + From 0b5d127f8a9bdc90f5b04db19e63dfc2107b4075 Mon Sep 17 00:00:00 2001 From: Melissa Linkert Date: Tue, 19 May 2026 20:11:41 -0500 Subject: [PATCH 5/5] Continue to build on Java 11/17 --- .github/workflows/ant.yml | 2 +- .github/workflows/maven.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ant.yml b/.github/workflows/ant.yml index b67508c604f..47f90aba94b 100644 --- a/.github/workflows/ant.yml +++ b/.github/workflows/ant.yml @@ -7,7 +7,7 @@ jobs: build: strategy: matrix: - java: [21, 25] + java: [11, 17, 21, 25] os: [ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1abc082f330..5d17a639a7f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -13,7 +13,7 @@ jobs: build: strategy: matrix: - java: [21, 25] + java: [11, 17, 21, 25] os: [ubuntu-latest, windows-latest, macos-latest] include: - java: '21'