Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8337280 Include jdk.jsobject module with JavaFX
  3. JDK-8342623

Release Note: The `jdk.jsobject` Module is Now Included with JavaFX

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Delivered
    • Icon: P4 P4
    • jfx24
    • jfx24
    • javafx

      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 jmoods. 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`).

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: