Skip to content

kotlin

A programming language very like java.

Installation

This is not as easy as it seems, the first 4 attempt just did not get me a working compiler in the PATH, and i don't want an install that has to add to PATH unless absolutely necessary.

This one seems to do the trick : sdkman.

install kotlin
1
2
3
4
wget -O sdk.install.sh "https://get.sdkman.io"
bash sdk.install.sh
source ~/.sdkman/bin/sdkman-init.sh
sdk install kotlin

The first two lines are for when you don't have sdkman yet. The 3rd line is actually what i needed when i already had sdk installed.

run
kotlinc hello.kt -include-runtime -d hello.jar
java -jar hello.jar 

So kotlin produces actual java code, neat.