我安装JDK8u20
并尝试使用其中的ControlsFX
库运行我的程序。
这应该可以正常工作,但是如果我从 controlsFX 调用方法,我会收到以下异常
方法
private void showError(final String msg) {
Platform.runLater(new Runnable() {
@Override
public void run() {
Dialogs.create().title("Achtung").message(msg).showError();
}
});
}
例外
java.lang.NoSuchMethodError: com.sun.javafx.scene.traversal.TraversalEngine.<init>(Ljavafx/scene/Parent;Z)V
at org.controlsfx.control.ButtonBar$2.<init>(ButtonBar.java:412)
at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:412)
at org.controlsfx.control.ButtonBar.<init>(ButtonBar.java:355)
at org.controlsfx.dialog.Dialog.createButtonPanel(Dialog.java:1034)
at org.controlsfx.dialog.Dialog.createCenterPanel(Dialog.java:1029)
at org.controlsfx.dialog.Dialog.buildDialogContent(Dialog.java:950)
at org.controlsfx.dialog.Dialog.show(Dialog.java:320)
at org.controlsfx.dialog.Dialogs.showSimpleContentDialog(Dialogs.java:1106)
at org.controlsfx.dialog.Dialogs.showError(Dialogs.java:555)
at ch.berufsbildungscenter.notiztool.gui.control.LoginController$3.run(LoginController.java:93)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/1171794308.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/1875594551.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$141(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$38/994750745.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)