[Bug 293756] Mk/Uses/java.mk: prefer latest LTS openjdk

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 13 Mar 2026 08:27:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293756

Benjamin Takacs <nimaje+fbz@bureaucracy.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nimaje+fbz@bureaucracy.de

--- Comment #5 from Benjamin Takacs <nimaje+fbz@bureaucracy.de> ---
(In reply to Ronald Klop from comment #4)
But in the example Vladimir gave there isn't a value set too. The port
specifies it *can* work with some versions, so if one of the versions it can
work with is the default java version it should use that. This also keeps
dependencies on non-default java versions down.

So I think if you want to keep that JAVA_PREFERRED_PORTS stuff, the default
java version should implicitly be the first value on that list. If the user
wants to change that value they should set DEFAULT_VERSIONS+=java=… and
JAVA_PREFERRED_PORTS should only be for the preferences after the default. But
as it is undocumented I have no problem with removing it too.

I'm against making _JAVA_PORTS_ALL depend on the presens of JAVA_VERSION and
say that it should be

_JAVA_PORTS_ALL= JAVA_PORT_NATIVE_OPENJDK_JDK_${JAVA_DEFAULT} \
    ${JAVA_PREFERRED_PORTS} \
    ${__JAVA_PORTS_ALL}

instead, making the default version the unconditional default, then giving the
user additional prefered versions (or drop that) and then do the rest of the
versions.

JAVA_VERSION=8+ and not specifying JAVA_VERSION should mean the same thing.

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