Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8340005

Eliminate native access calls from javafx.swing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jfx24
    • jfx24
    • javafx
    • b14

      While implementing JDK-8339517 to eliminate native access warnings by passing "--enable-native-access" for the three JavaFX modules with native code (javafx.graphics, javafx.media, and javafx.web), I discovered that the Swing interop code in javafx.swing calls a JNI method defined in one of the native graphics libraries (prism-common) directly.

      This means that even after JDK-8339517 is fixed, we still get native access warnings when running any test that uses SwingNode.

      WARNING: A native method in com.sun.javafx.embed.swing.newimpl.SwingNodeInteropN has been bound
      WARNING: com.sun.javafx.embed.swing.newimpl.SwingNodeInteropN::overrideNativeWindowHandle is declared in module javafx.swing (file:/Users/kcr/dev/javafx/jfx-kcr/jfx/rt/build/shims/javafx.swing/)
      WARNING: Use --enable-native-access=javafx.swing to avoid a warning for native methods declared in this module
      WARNING: Restricted methods will be blocked in a future release unless native access is enabled

            psadhukhan Prasanta Sadhukhan
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: