From nobody Thu Mar 12 11:36:23 2026 X-Original-To: java@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4fWltk4NmQz6V9dH for ; Thu, 12 Mar 2026 11:36:14 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fWltk3dKLz3YSg for ; Thu, 12 Mar 2026 11:36:14 +0000 (UTC) (envelope-from ronald@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773315374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPw9dTOcKC7WYh1B925DScqt0qF49zXnZ86Fx9vmq1U=; b=C7YyIWgjnurARiBfGcTuGbNwttbl7ORlFRkyarAljUvoJz9wumokToRddwHCtlx8GuqTvU IC9ElqjdfBcenW4lvWwZggtjXTR1w28UonB4z8VVi6VqqLa8H2t2k69CnkYrXgIHt+4Lu9 uL9OS6u5ptx1yw9UZmFXqnVD+8IiQ0ufCXQmHJsXl+jTN7OR+muzEiZfI0+GerhCUp4SlB xB8Nb1gEoyNUP8Gy0WCbjKdX7swrvfkoMJA+/reLOQDCXkAKe8tUAP7XVxCmPK3ZdWWdTN oqITN6l2QULGvIF7yneqe54Pez52abHjWV1EKLk8BbO0+du3r6DHRqHw5+R3dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1773315374; a=rsa-sha256; cv=none; b=sQpZSQryi5fBtsQmSTDqxxIAoIqFRdMQyJ7xsu9lKN96sFIGU+BFiWbZ9KzX0wkJ8+LPS/ CZZs4x7fmKU+zOyLeoWfMkwKg6qsWJvmchAxQ2ctAMetxztUD7xHx2xzLR7+cWBnr/cmJT T7NfHWnXMdxESlhntxe37lAnU3G+YRXZHoxBYUwL7eAQum0449cQCdVjHCuajkK8Q27X/8 DiLpvchDhzdmF4DQKOo3owJKYN/mAvCO7veouW9os2cy64TAAJYsDv8oprswJnZ3Jm53bs 6yak9Z5zR+rtaK0gsdEASY977jVW7fgtpR9FObiL5IFZhPrJrEcMQVz8FoMY2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1773315374; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VPw9dTOcKC7WYh1B925DScqt0qF49zXnZ86Fx9vmq1U=; b=QfZMd+3zQx3CpB2dbv03OZoHYO257tfpMMCNxx+mosOh7/u8TVtCBp34Duc5MIHFxu0oDg HFV7nabIMYEF2joQ24t/du9g+ZaZRWboEX3a4exZfN3M9+jPaX6r1kogzcgRCB3S+RVc4U B/LBz1QS9b8taYaw7m7MZoNSmJZZI3RwVbHlXThgZNWLydXqZipRMracmx+wZJrKTtfBgf fv/ZdPRLcYDE7+Wlo7n4ZJudcXM0Z6u0SAjPTjvXBiSOvzoWm8M1MH4vUCCp+sDBumvVQq QUb0y1eTNDDTGbhNl2Wpotm36mzRGWtcAwoM+YKsl/33xk3Lfwq0sKVzI+Y90A== Received: from [192.168.11.193] (83-81-213-118.cable.dynamic.v4.ziggo.nl [83.81.213.118]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: ronald/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4fWltk05Ywz19TP for ; Thu, 12 Mar 2026 11:36:13 +0000 (UTC) (envelope-from ronald@FreeBSD.org) Message-ID: Date: Thu, 12 Mar 2026 12:36:23 +0100 List-Id: Porting Java to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-java List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-java@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta From: Ronald Klop Subject: proposal for preferred jdk in ports To: java@freebsd.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, I want to get some feedback on a proposal in a change on which JDK is preferred in ports. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=293756 The idea came from talks in other PRs with ideas about picking a preferred JDK. My proposal is attachment: https://bugs.freebsd.org/bugzilla/attachment.cgi?id=268746&action=diff . The idea explained. I hope I can explain it good enough. TL;DR: prefer latest LTS JDK instead of oldest JDK from the support range. Current situation: 1. If no JAVA_VERSION is defined, ports picks JAVA_DEFAULT (currently 21); this is a simple case and is fine as it is. 2. If JAVA_VERSION is a range like JAVA_VERSION=8 11 17 or JAVA_VERSION=17+, ports currently picks the lowest number. So here it pick 8 and 17 respectively. New situation: 1. no JAVA_VERSION defined, still JAVA_DEFAULT is used; no changes, this is fine. 2. if JAVA_VERSION is a range we will now pick the highest LTS version. In the example above we will now pick 17 (for 8 11 17) and 25 (for 17+). I think this better matches using modern software. Some notes: - I tested that in the current state of the ports tree all java ports still compile fine. - The USES=java mechanism of looking for installed JDKs still works the same. If you only install jdk22 and no LTS versions it will pick the jdk22. In the PR might be a little more elaborate explanation. I hope people find this proposal; simple enough to adopt without to much risky changes. Regards, Ronald.