[Bug 296414] java/openjdk25: flavor headless doesn't get used

[email protected] Fri, 03 Jul 2026 09:37:51 +0000
Newsgroups gmane.os.freebsd.devel.java
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D296414

Ronald Klop <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #7 from Ronald Klop <[email protected]> ---
Well. It is pretty easy to extent /usr/ports/Mk/Uses/java.mk with support f=
or
something like JAVA_FLAVOR=3D-headless.
https://cgit.freebsd.org/ports/tree/Mk/Uses/java.mk#n403
-DEPEND_JAVA=3D   ${JAVA}:${JAVA_PORT}
+DEPEND_JAVA=3D   ${JAVA}:${JAVA_PORT}${JAVA_FLAVOR}

I think we could even automate this a bit by handling OPTIONS_UNSET+=3DX11 =
in
java.mk.
That will bring a lot of what you are looking for.

Some issues that might arise:
- -headless is only implemented for openjdk25 and 26. All older jdk versions
don't have that.
- the number of possible configurations increases a lot. Experience shows m=
ost
of these configurations will not be tested pro-actively.

I'd expect if we add JAVA_FLAVOR, that in the near future we get bug reports
like: port XYZ does not work with JAVA_FLAVOR=3D-jre-headless.

Does somebody want to spent time on handling these issues when they are
reported in the future?
Or are we happy with the stability of the current situation of Java on Free=
BSD?

NB: this JAVA_FLAVOR is at compile time, so the package builders will choos=
e 1
flavor and build all Java ports with it. This does not give a choice at pkg
install time to run pkg X with java-headless. With the idea above you would
need to build your own packages with JAVA_FLAVOR set.

--=20
You are receiving this mail because:
You are the assignee for the bug.=