Professional Documents
Culture Documents
The java launcher loads only the transitive closure of modules required by
the application
All default modules loaded if your application main class is in the unnamed module
modules/
javafx.base/
javafx.controls/
javafx.graphics/
...
Public Public
javafx.base jdk.packager
javafx.controls jdk.packager.services
javafx.fxml
javafx.graphics
javafx.media
javafx.swing
javafx.web
Internal
javafx.deploy [closed]
javafx.graphics
javafx.base
javafx.graphics
javafx.base
javafx.graphics
javafx.base
Copyright 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential Internal/Restricted/Highly Restricted 26
Encapsulation of Modules
Only explicitly exported packages are visible
Provides strict encapsulation of implementation details
Internal API is no longer accessible
Accessing any type in a non-exported package will result in an error
And no, you cant simply use reflection to call setAccessible
This can be overridden with --add-exports command line switch in extreme need
module my.app {
requires javafx.controls;
module my.app {
requires javafx.controls;
requires javafx.fxml;
Copyright 2016, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential Internal/Restricted/Highly Restricted 36
JDK 8 and Earlier :: State of the Nation :: UI Controls
We need to iterate:
fill gaps in functionality,
fixing bugs,
improving support for third party UI controls
JDK 9: Modules
Control Skin
Behavior
Control Skin
Behavior
CssMetaData
Styleable
StyleableProperty
Support for custom pseudoclass states.
SimpleStyleable*Property
PseudoClass
e.g.
.button:javaone {
..
}
javafx.css
Some JavaFX apps and libraries will fail to compile / execute under JDK 9.
Control Skin
Behavior
Overall: Essentially this subproject is complete. Code is now in public JDK 9 repos for review.
Control Skin
Public API
(javafx.scene.control) Private Implementation
(com.sun.javafx.scene.control.*)
Behavior
Control
Public API
(javafx.scene.control) Behavior Private Implementation
(com.sun.javafx.scene.control.*)
Skin
Overall: Essentially this subproject is complete. Code is now in public JDK 9 repos for review.
Its critical that the community test and give feedback on JDK 9 as soon as
possible!
In summary: some open source apps and some customer apps break!
[1] http://mail.openjdk.java.net/pipermail/openjfx-dev/2015-June/017340.html
E.g.
Bad API Proper API
com.sun.javafx.collections.ObservableListWrapper javafx.collections.FXCollections
com.sun.javafx.css.StyleConverterImpl javafx.css.StyleConverter
com.sun.javafx.css.PseudoClassState javafx.css.PseudoClass
If no pulse is running, this will run a pulse at some point in the future, even if
no pulse is required.
If a pulse is running, another one will be scheduled once it completes.
Applications that dont fit one of these patterns often resort to calling
PlatformImpl.startup which is no longer accessible
Starts the JavaFX runtime and then calls the run method of the Runnable
on the JavaFX Application Thread
The startup method returns before the Runnable is run
Must not be called if the JavaFX runtime has already been started
Cannot be used to restart the JavaFX runtime after it has terminated
We are gathering feature ideas from the usual places (JBS, community
feedback, internally, etc.)