<div dir="ltr">Hi Kevin, all,<div><br></div><div>I agree with this proposal and with the rationale behind it. It provides a solid foundation for future consistent decisions as well.</div><div><br></div><div>- Johan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 16, 2024 at 11:14 PM Kevin Rushforth <<a href="mailto:kevin.rushforth@oracle.com">kevin.rushforth@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">All,<br>
<br>
Even though we build JavaFX binaries with JDK 21 as the boot JDK, the <br>
latest version of JavaFX still runs with JDK 17, although it isn't <br>
tested with older JDK versions. In order for JavaFX to be able to use <br>
newer JDK features, such as code snippets (in API docs), record <br>
patterns, pattern matching for switch statements, and so forth, we need <br>
to increase the minimum version of the JDK that can run the latest <br>
JavaFX. Additionally, there is an ongoing cost to keeping JavaFX <br>
buildable and runnable on older versions of Java, and very little reason <br>
to continue to do so.<br>
<br>
A question was raised [1] as to whether we should go even further and, <br>
once JDK 22 is released, jump straight to JDK 22 as a  minimum. While we <br>
could do that, I feel that there isn't sufficient justification for this <br>
at this time, although we could reconsider for next release.<br>
<br>
To this end, I propose to bump the minimum version of the JDK needed to <br>
run JavaFX 23 to JDK 21. I filed JDK-8321603 [2] to track this and <br>
prepared PR  #1370 [3] (I've moved the PR back to Draft, pending this <br>
discussion). This will not affect update releases of earlier versions of <br>
JavaFX (e.g., JavaFX 21.0.NN or JavaFX 17.0.NN), which will continue to <br>
run with the same minimum JDK that they run on today.<br>
<br>
As a reminder, we only assure that JavaFX NN will run with JDK NN-1 or <br>
later, although in practice, we don't bump the minimum required JDK <br>
version without a good reason. For example, while JavaFX 22 is built <br>
using JDK 21 as the boot JDK, it produces class files that will run with <br>
JDK 17, using "--release 17". The proposed change discussed here would <br>
update that in JavaFX 23 to "--release 21".<br>
<br>
NOTE: this will not be an invitation to do wholesale refactoring of <br>
existing classes or methods to use newer language features (e.g., a PR <br>
that refactors existing switch statements and switch expressions into <br>
pattern-matching switch expressions would not be welcome). Rather, this <br>
can be seen as enabling judicious use of new features in new code, much <br>
as we did when we started allowing the use of "var", records, and <br>
pattern-matching instanceof.<br>
<br>
Comments are welcome.<br>
<br>
-- Kevin<br>
<br>
[1] <a href="https://mail.openjdk.org/pipermail/openjfx-dev/2023-December/044081.html" rel="noreferrer" target="_blank">https://mail.openjdk.org/pipermail/openjfx-dev/2023-December/044081.html</a><br>
[2] <a href="https://bugs.openjdk.org/browse/JDK-8321603" rel="noreferrer" target="_blank">https://bugs.openjdk.org/browse/JDK-8321603</a><br>
[3] <a href="https://github.com/openjdk/jfx/pull/1370" rel="noreferrer" target="_blank">https://github.com/openjdk/jfx/pull/1370</a><br>
<br>
</blockquote></div>