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 -- seeJDK-8073320. This class used to have a getDefaultScale() method and now has separate getDefaultScaleX() and getDefaultScaleY() methods.
$ 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
- blocks
-
JDK-8149964 Update FX 9 boot JDK to JDK 9
- Resolved
- relates to
-
JDK-8134709 Cannot compile FXDnD with JDK 9: DropTargetContext::addNotify, removeNotify not found
- Resolved
-
JDK-8150064 Need complete fix for Java2D Hi-DPI code in JFXPanel
- Closed