- Loading...
...
The security manager, which was used by some client applications, is no longer available. See https://openjdk.org/jeps/486 for details.
Important new APIs -
javafx.scene.control.skin | New package containing several Skin classes | |
New package containing several CSS related classes | ||
javafx.application | Platform.enterNestedEventLoop(Object) Platform.exitNestedEventLoop(Object, Object) | |
javafx.stage | Window.getWindows() | |
javafx.fxml | javafx.fxml | |
javafx.graphics | javafx.scene.text | Font.loadFonts(InputStream, double) Font.loadFonts(String, double) |
...
...
...
...
Download & unzip the SDK for your platform from https://jdk.java.net/javafx24
Put the javafx modules on your module-path when you compile or run, and list the javafx modules you need using --add-modules
Code Block |
---|
$ javac --module-path javafx-sdk-24/lib --add-modules javafx.controls MyFXApp.java
$ java --module-path javafx-sdk-24/lib --add-modules javafx.controls MyFXApp |
Modular apps don't have to specify --add-modules, as the needed modules are in module-info.java of the application.
An even easier way to compile and run JavaFX applications
...
is to create a custom JDK that includes the JavaFX modules. You can optionally add your modular application to this custom JDK.
Download & unzip jmods for your platform from https://jdk.java.net/javafx24
Run jlink to produce a JDK that includes the JavaFX modules
...
:
Code Block |
---|
$ jlink --output jdk-24+javafx-24 \
--module-path javafx-jmods-24:$JAVA_HOME/jmods \
--add-modules ALL-MODULE-PATH |
Compile and run your application as follows:
Code Block |
---|
jdk-24+javafx-24/bin/javac MyFXApp.java
jdk-24+javafx-24/bin/java MyFXApp |