kotlinfx.builders.StackPane runtime exeption: NoSuchMethodError
voddan opened this issue · comments
The issue appeared when I was trying to lunch 'Hello World' example.
https://github.com/eugenkiss/kotlinfx/blob/master/kotlinfx-demos/src/main/kotlin/HelloWorld.kt
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source)
at com.sun.javafx.application.LauncherImpl.access$000(Unknown Source)
at com.sun.javafx.application.LauncherImpl$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.NoSuchMethodError: javafx.scene.layout.StackPane.([Ljavafx/scene/Node;)V
at kotlinfx.builders.StackPaneK.(Layout.kt:204)
at kotlinfx.builders.BuildersPackage-Layout-7f0230ad.StackPane(Layout.kt:194)
at kotlinfx.builders.BuildersPackage-Layout-7f0230ad.StackPane$default(Layout.kt:192)
at kotlinfx.builders.BuildersPackage.StackPane$default(Unknown Source)
at HelloWorld$start$1$1.invoke(main.kt:41)
at HelloWorld$start$1$1.invoke(main.kt)
at kotlinfx.builders.BuildersPackage-Scene-e907cc0b.Scene(Scene.kt:83)
at kotlinfx.builders.BuildersPackage.Scene(Unknown Source)
at HelloWorld$start$1.invoke(main.kt:40)
at HelloWorld$start$1.invoke(main.kt)
at kotlinfx.builders.BuildersPackage-Stage-651bb459.Stage(Stage.kt:48)
at kotlinfx.builders.BuildersPackage.Stage(Unknown Source)
at HelloWorld.start(main.kt:39)
at com.sun.javafx.application.LauncherImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$5.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl$4$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl$4.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication$3$1.run(Unknown Source)
... 1 more
The problem turned out to be my JDK version.
Make sure you use JDK8