Re: javac source & target

From: Harald Eilertsen <haraldei_at_anduin.net>
Date: Thu, 11 Dec 2025 13:48:33 UTC
On Thu, Dec 11, 2025 at 01:33:50PM +0100, Ronald Klop wrote:
> I'm looking into the PR "Mk/bsd.default-versions.mk: update JAVA_DEFAULT to 21".
>  https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272855
>
[...]
> To make class files usable between ports I think it is user friendly to compile targeted for the oldest JDK in the ports tree which is now openjdk8.
> Or we can aim to remove the source/target definitions and compile for JAVA_DEFAULT.
> Unfortunately these source/target definitions are often hardcoded in the source code of the port so we need to patch anyways.

I would assume that the upstream project has set the -source and -target
options based on the JVM features they use, and that it is best to
respect that as much as possible.

H!