New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8256362: JavaFX must warn when the javafx.* modules are loaded from the classpath #354
8256362: JavaFX must warn when the javafx.* modules are loaded from the classpath #354
Conversation
👋 Welcome back kcr! A progress list of the required criteria for merging this PR into |
@kevinrushforth this pull request will not be integrated until the CSR request JDK-8256422 for issue JDK-8256362 has been approved. |
@kevinrushforth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
I am switching the target branch to |
@kevinrushforth This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 24 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, and I didn't hear objections (on the warning) on this PR nor in JBS or the mailinglist, so this is ok to be merged.
/integrate |
@kevinrushforth Since your change was applied there have been 24 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 1d45997. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
This fix adds documentation and a warning to clarify that loading the JavaFX modules from the classpath is not a supported configuration. This will not affect deployments that put the JavaFX modular jars on the classpath, but will simply warn that it is an unsupported mode.
JavaFX is built and distributed as a set of named modules, each in its own modular jar file. This supports running both modular and non-modular applications.
The JavaFX runtime expects its classes to be loaded from a set of named
javafx.*
modules, and does not support loading those modules from the classpath. The Java launcher will fail to load applications that extendjavafx.application.Application
unless thejavafx.graphics
module is on the module path.Applications that do not extend
javafx.application.Application
can be loaded even if thejavafx.*
classes are loaded from the classpath, but this is an unsupported configuration.This creates the perception that there is a problem with the standard case of loading a subclass of
javafx.application.Application
, since it fails to load in the case where the JavaFX classes are loaded from the classpath. Further, allowing applications to run in an unsupported mode that likely has bugs creates a maintenance burden. Another problem is that when the JavaFX classes are loaded from the classpath, it breaks encapsulation, since we mo longer get the benefit of the java module system.The primary reason given for application deployments loading the javafx modules on the classpath usually boils down to one of tooling support, although both gradle and maven now support modules as do all of the popular IDEs.
/csr needed
/reviewers 2
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/354/head:pull/354
$ git checkout pull/354