How do you start Kotlin files?
-
Hello, everyone! I started studying Kotlin. Can you tell me how to start a...kt file from the conductor?
P.S. I have Windows 10
-
File.kt can't start because it's a simple text file. To launch it, we'll have to scoop it up to the White Code first. For example
kotlinc MyProgram.kt -d MyProgram.jar
And then you start like a regular jar.
java -jar MyProgram.jar
It is possible to scopy by adding to the file a performance environment (but the final file will increase). Then it's got to be the conductor through the double click.
kotlinc MyProgram.kt -include-runtime -d MyProgram.jar