JDK-8342623 : Release Note: The `jdk.jsobject` Module is Now Included with JavaFX
  • Type: Sub-task
  • Component: javafx
  • Sub-Component: other
  • Affected Version: jfx24
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-10-18
  • Updated: 2025-03-14
  • Resolved: 2025-01-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx24Resolved
Related Reports
Relates :  
Description
The `jdk.jsobject` module, which is used by JavaFX WebView applications, is now included with JavaFX, replacing the JDK module of the same name. The `jdk.jsobject` module is deprecated as of JDK 24, and will be removed in a future release of the JDK.

To facilitate the transition, `jdk.jsobject` is now an upgradable module in the JDK. This means that the version of `jdk.jsobject` delivered with JavaFX can be used in place of the one in the JDK to avoid the compiler warning. This can be done as follows:

#### Applications using the SDK

When running with the JavaFX SDK, use the `--upgrade-module-path` argument. For example:

```
javac --upgrade-module-path=/path/to/javafx-sdk-24/lib
java --upgrade-module-path=/path/to/javafx-sdk-24/lib
```

NOTE: The above will fail if you run your application with JDK 23 or earlier. JDK 24 is recommended when running JavaFX 24, but if you choose to run JavaFX 24 with an earlier JDK, use the `--module-path` option instead.

#### Applications using `jlink` to create a custom Java runtime image:

When creating your custom Java runtime image, put the JavaFX jmods on the module path ahead of the JDK jmods. For example:

```
jlink --output jdk-with-javafx \
    --module-path /path/to/javafx-jmods-24:/path/to/jdk-24/jmods \
    --add-modules ALL-MODULE-PATH
```

NOTE: The above will fail if you create a custom image using JDK 23 or earlier. JDK 24 is recommended with JavaFX 24, but if you choose to run JavaFX 24 with an earlier JDK, put the JDK jmods ahead of the JavaFX jmods on the module path (that is, reverse the order of `javafx-jmods-24` and `jdk-24/jmods`).