No class -- just "fun main"?

Unless you use a @JvmStatic annotation you cannot create a static main function as required as a member of a Main class. The idiomatic way would be a free-standing function (outside of a class). The class name is just the filename with Kt appended (and extension removed). You can use an annotation to change that name though. For where to find the main function, you will have to put the right class name in your manifest the same way as in Java - it is how Java determines the main function to use.

2 Likes