[Bug 289858] Mk/Uses/java.mk: Use JAVA_VERSION as priority

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 12 Jan 2026 15:01:18 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289858

--- Comment #6 from Vladimir Druzenko <vvd@FreeBSD.org> ---
Side effect - selects 8 if JAVA_VERSION is not specified, even if the default
Java is different. And if JAVA_VERSION=17+, it will select 17 even if the
default version is 21 (if none of the supported Java versions are installed).
This is considered version 17 has the highest priority.
There may be cases where the preferred version should be used regardless of the
default version if no Java is installed (for example in poudriere), but other
versions are allowed to be used if they are already installed and supported by
the port (live system).

We may have to create a flag JAVA_USE_PREFERRED:
"yes" - if no Java version is installed, then use the priority version,
"no" - otherwise the default version (if supported by port).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.