If this is your first day in Kotlin and you don’t have experience with Java as well (your problem is more really about the Java, not Kotlin), then I suggest you to use a proper IDE like IntelliJ and it will do this for you. Running compilers and executing manually is a kind of advanced usage, it requires some additional knowledge.
Short answer is to run this instead:
java -cp first.jar FirstKt
But still, I think IDE will be much easier for you. Alternatively, create a very basic gradle build script.
Thanks @broot
but when I run
D:\Kotlinplay>java -cp first.jar FirstKt
Error: Main method not found in class FirstKt, please define the main method as:
public static void main(String args)
or a JavaFX application class must extend javafx.application.Application