Description
As a result of the fix for JDK-8074763 we can no longer compile FX 9-dev using JDK 9 as the boot JDK. We currently use JDK 8u40 as our boot JDK, so our production builds are not affected. However, Swing / FX drag and drop will likely fail at runtime with a NoSuchMethodError as a result of this.
Here is the error:
$ java -version
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b77)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b77, mixed mode)
$ gradle
...
:swing:compileJava/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:480: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:489: error: cannot find symbol
ctx.addNotify(FXDropTargetContextPeer.this);
^
symbol: method addNotify(FXDnD.FXDropTargetContextPeer)
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:511: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:520: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':swing:compileJava'.
> Compilation failed with exit code 1; see the compiler error output for details
.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Here is the error:
$ java -version
java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b77)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b77, mixed mode)
$ gradle
...
:swing:compileJava/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:480: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:489: error: cannot find symbol
ctx.addNotify(FXDropTargetContextPeer.this);
^
symbol: method addNotify(FXDnD.FXDropTargetContextPeer)
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:511: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
/localhome/kcr/javafx/9-kcr/jfx/rt/modules/swing/src/main/java/javafx/embed/swing/FXDnD.java:520: error: cannot find symbol
if (ctx != null) ctx.removeNotify();
^
symbol: method removeNotify()
location: variable ctx of type DropTargetContext
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':swing:compileJava'.
> Compilation failed with exit code 1; see the compiler error output for details
.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Attachments
Issue Links
- blocks
-
JDK-8149964 Update FX 9 boot JDK to JDK 9
- Resolved
- relates to
-
JDK-8074763 Remove API references to java.awt.dnd.peer
- Resolved
-
JDK-8073320 Windows HiDPI Graphics support
- Resolved
-
JDK-8149967 Cannot compile JFXPanel with JDK 9: SurfaceData::getDefaultScale not found
- Resolved
-
JDK-8150175 Need replacement in FXDnD for DropTargetContext::addNotify, removeNotify
- Resolved