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

Cannot compile JFXPanel with JDK 9: SurfaceData::getDefaultScale not found

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
      None

      Description

      Compiling FX with a recent build of JDK 9 gives the following error:

      $ java -version
      java version "9-ea"
      Java(TM) SE Runtime Environment (build 9-ea+105-2016-02-10-235300.javare.4433)
      Java HotSpot(TM) Client VM (build 9-ea+105-2016-02-10-235300.javare.4433, mixed mode)

      $ gradle
      ...
      /localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/JFXPanel.java:692: error: cannot find symbol
                      newScaleFactor = ((SunGraphics2D)g).surfaceData.getDefaultScale();
                                                                     ^
        symbol: method getDefaultScale()
        location: variable surfaceData of type SurfaceData

      This is a result of changes to the sun.java2d.SurfaceData class for Windows Hi-DPI support -- see JDK-8073320. This class used to have a getDefaultScale() method and now has separate getDefaultScaleX() and getDefaultScaleY() methods.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kcr Kevin Rushforth
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: