You found the answer to your original question, but a couple of things on this last bit of code:
You don’t need to have both a class App and and object App. If all you want is a static container for a function, you can have object App at the top level of your code. This will work even from Java, with the @JvmStatic annotation. You would just call App.main() like you would with any method of a static Java class.
Alternately, you could have an anonymous companion object, which also gets called as App.main():
class App {
companion object {
fun main()
}
}
Because this is main though, you don’t even need that. You can just do fun main(args: Array<String>) at the top level of your code.