Ich habe eine Anwendung geschrieben in Java 8 mit ControlsFX 8.40.14.Verwenden von CcontrolsFX SpreadsheetView in Java 9
Ich starte die App unter Java 9 (jdk-9.0.1, um genau zu sein) und ich habe die folgende Ausnahme, wenn die App versucht, SpreadsheetView-Komponente anzuzeigen.
Exception in thread "JavaFX Application Thread" java.lang.NoSuchMethodError: javafx.scene.control.TableColumn.impl_setReorderable(Z)V
at org.controlsfx.control.spreadsheet.SpreadsheetView.getTableColumn(SpreadsheetView.java:2216)
at org.controlsfx.control.spreadsheet.SpreadsheetView.setGrid(SpreadsheetView.java:1162)
at org.controlsfx.control.spreadsheet.SpreadsheetView.<init>(SpreadsheetView.java:563)
at org.controlsfx.control.spreadsheet.SpreadsheetView.<init>(SpreadsheetView.java:475)
(...)javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.graphics/javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3589)
at javafx.graphics/javafx.scene.Scene$ClickGenerator.access$8300(Scene.java:3517)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3885)
at javafx.graphics/javafx.scene.Scene$MouseHandler.access$1300(Scene.java:3604)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1874)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2613)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:397)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:434)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:433)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:556)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:942)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:175)
at java.base/java.lang.Thread.run(Thread.java:844)
Die gleiche Ausnahme tritt auf, wenn die App mit jdk1.8.144 und jdk-9.0.1
ich nicht zu ControlsFX zusammengestellt 9.0.0 wie sie don't support SpreadsheetView noch wandern können.
Haben Sie eine Idee, wie Sie eine solche Anwendung in Java 9 ausführen?
ich glaube, das Problem hier ist, dass die API tatsächlich geändert wird und die impl_setReorderable ist nun öffentlich in Java 9 - setReorderable() und heißt nicht mehr impl_setReorderable() - also musst du entweder ru n auf JDK 8 oder upgraden auf ControlsFX 9 –
Nur um Sie wissen zu lassen, dass ich etwas Zeit für die Migration der SpreadsheetView in Richtung JDK9 brauche. Viele Funktionen von SpreadsheetView wurden aus JDK9 entfernt und ich weiß nicht, wie ich diese umgehen kann. Also die Tatsache, dass es in JDK9 nicht funktioniert. – Maxoudela