How do I write a "launcher" class for TornadoFX ap...
# getting-started
v
How do I write a "launcher" class for TornadoFX app to be able to run it from jar-file? I have tried to use Maven's (I'm using Maven)
maven-jar-plugin
configuration to generate MANIFEST.MF file with
Main-Class
entry, it does but with no success - TornadoFX app class is inherited from
Application
and has no static
main
method
s
#tornadofx ?
2
v
Oh, that channel did not show up and I was unaware of it, thanks
👍 1
h
Application has launch(args), call that from your main
v
So I just can add
main
into tornado's
App
calling that method?
h
You should have your own class extending
App
, lets say it's called
MyApp
. In MyApp.kt you would then have:
Copy code
fun main(args: Array<String>) {
    Application.launch(MyApp::class.java, *args)
}
👍 1
v
Yeah, got it, inside
companion object
, thanks