fun main(args: Array<String>) { println("Hello World!") }
kotlinc greeting.kt hello.kt -include-runtime -d hello.jar
java -jar hello.jar
Find Kotlin path with which kotlin
.
export PATH=$PATH:/path/from/which/kotlin function kotlinr() { echo Compiling, please wait... kotlinc $1 -include-runtime -d out.jar java -jar out.jar }
After sourcing, you could now run kotlinr hello.kt
.