Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8210759 Swing interop fails when using a minimal jdk image created with jlink
  3. JDK-8210790

Release Note: Swing interop fails when using a minimal jdk image created with jlink

XMLWordPrintable

      A minimal Java image created using jlink that includes the javafx.swing module from the JavaFX 11 jmods bundle will fail to run FX / Swing interop applications. For example, an image created as follows will not work:

      ```
          jlink --output myjdk --module-path javafx-jmods-11 \
              --add-modules java.desktop,javafx.swing,javafx.controls
      ```

      The javafx.swing module depends on a new jdk.unsupported.desktop module in JDK 11 that must either be explicitly added or included via the `--bind-services` option.

      Workaround: create your image using one of the following two methods:

      ```
          jlink --output myjdk --module-path javafx-jmods-11 \
              --add-modules java.desktop,javafx.swing,javafx.controls,jdk.unsupported.desktop

          jlink --output myjdk --bind-services --module-path javafx-jmods-11 \
              --add-modules java.desktop,javafx.swing,javafx.controls
      ```

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

              Created:
              Updated:
              Resolved: