java/javavmwrapper: JAVA_VERSION does not work with openjdk25
Remove the hard coded lists of java version numbers to iterate over when
JAVA_VERSION is set to N+. Instead use N as the lowest boundary, and the
latest available JDK as the upper bound, and just scan for the highest
available version satisfying the requirement.
Ideally it should be possible to deduce the upper bound from the
available java versions in ${PREFIX}/etc/javavms, but leaving that for
later.
Co-authored-by: jonc@chen.org.nz
PR: 293231
Reported by: jonc@chen.org.nzDetails
Details
- Reviewers
- None
% cat /usr/local/etc/javavms /usr/local/openjdk26/bin/java /usr/local/openjdk25/bin/java /usr/local/openjdk17/bin/java /usr/local/openjdk11/bin/java % JAVA_VERSION=11 java -version openjdk version "11.0.30" 2026-01-20 OpenJDK Runtime Environment (build 11.0.30+7-1) OpenJDK 64-Bit Server VM (build 11.0.30+7-1, mixed mode) % JAVA_VERSION=21+ java -version openjdk version "26" 2026-03-17 OpenJDK Runtime Environment (build 26+35-1) OpenJDK 64-Bit Server VM (build 26+35-1, mixed mode, sharing) % JAVA_VERSION=8+ java -version openjdk version "26" 2026-03-17 OpenJDK Runtime Environment (build 26+35-1) OpenJDK 64-Bit Server VM (build 26+35-1, mixed mode, sharing) % JAVA_VERSION="8 11 17" java -version openjdk version "17.0.18" 2026-01-20 OpenJDK Runtime Environment (build 17.0.18+8-1) OpenJDK 64-Bit Server VM (build 17.0.18+8-1, mixed mode, sharing) % JAVA_VERSION="17 8 11" java -version openjdk version "17.0.18" 2026-01-20 OpenJDK Runtime Environment (build 17.0.18+8-1) OpenJDK 64-Bit Server VM (build 17.0.18+8-1, mixed mode, sharing) % JAVA_VERSION="17 8+ 11" java -version openjdk version "26" 2026-03-17 OpenJDK Runtime Environment (build 26+35-1) OpenJDK 64-Bit Server VM (build 26+35-1, mixed mode, sharing)
Diff Detail
Diff Detail
- Repository
- R11 FreeBSD ports repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 72873 Build 69756: arc lint + arc unit
Event Timeline
Comment Actions
This change was pushed in commit https://cgit.freebsd.org/ports/commit/?id=7878106082fd1f07814d754ef767c1f59168d1e9