Closed dom3k closed 6 years ago
I forgot to add that runing directly https://fx.appsdev.pl/pankdev/fxldemo-gradle-1.0.jar works fine. I add my zipped project to https://fx.appsdev.pl/fxldemo-gradle/fxldemo-gradle.zip
Ok, after thousand tries, finally i found solution. It is my main class:
class Main() :App(MainView::class) {
companion object {
@JvmStatic
fun main(args: Array<String>) {
println("Start App")
Application.launch(Main::class.java,*args)
}
}
}
because of:
Caused by: java.lang.NoSuchMethodException: pl.pankdev.MainKt.<init>()
at java.lang.Class.getConstructor0(Unknown Source)
... 10 more
I am happy now ;)
This is not the way to go. You're supposed to mention the JavaFX Application subclass you created, in this case pl.pankdev.MyAppKt
. You don't need a main method, java already knows how to start JavaFX Applications directly. Kick out your main function and reference the app class directly.
Thank you. Now everything is clear for me. All the best for you.
Great :)
At the beginning I want to thank you for your contribution to fxlauncher and TornadoFX.
Unfortunately, I have a problem with the correct configuration.
After download and run fxlauncher from fx.appsdev.pl/pankdev
I have got this error:
I have no idea what I'm doing wrong. When I run prue JavaFx class without tornadoFx and Kotlin everything works fine.
Could you help me? Thanks.
My gradle.build
main.kt
MainView.kt