RFR: 8248122: java.base should not handle JavaFX application in a specific way

Kevin Rushforth kcr at openjdk.java.net
Sat Oct 31 16:12:53 UTC 2020

On Sat, 31 Oct 2020 15:25:13 GMT, Kartik Ohri <github.com+27751938+amCap1712 at openjdk.org> wrote:

> JavaFX is no longer a part of OpenJDK. It makes sense to not treat it specially in the JDK. Hence, refactoring the Launcher class to remove JavaFX specific code.
> Further investigation reveals that some JavaFX specific code is also present in the `javadoc` tool. For instance,
> https://github.com/openjdk/jdk/blob/master/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java#L90-L96
> https://github.com/openjdk/jdk/blob/master/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/BaseOptions.java#L347-L353
> I think we should remove this code as well and the related tests for it.

This will cause a regression in behavior. It will break existing JavaFX applications that do not have a main program. It could also break applications that create or use certain JavaFX objects in the class initializer of their JavaFX application.

There was [some initial discussion](https://bugs.openjdk.java.net/browse/JDK-8202553?focusedCommentId=14176584&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14176584) around doing this as a follow-on to the removal of JavaFX from JDK 11, but if it is to be done, it needs to be discussed first. It would need to be done using a process similar to deprecation-for-removal. We would need to make changes in the JDK and/or JavaFX to warn about this in one release, and then remove it in the following. A CSR would be needed for both steps.

I note that while I disagree with the rationale described in [JDK-8248122](https://bugs.openjdk.java.net/browse/JDK-8248122) for making this change, I am not necessarily opposed to the change itself.


Changes requested by kcr (Author).

PR: https://git.openjdk.java.net/jdk/pull/978

More information about the jdk-dev mailing list