Install the Kotlin Compiler in Kotlin

From the Kotlin cheat sheet ยท Setup ยท verified Jul 2026

Install the Kotlin Compiler

Install Kotlin with SDKMAN or Homebrew, verify it, and build a JAR.

bash
# macOS or Linux with SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java
sdk install kotlin

# macOS with Homebrew
brew install kotlin
๐Ÿ“Œ Install a supported JDK before using the Kotlin/JVM compiler
๐Ÿ’ก IntelliJ IDEA also includes first-class Kotlin project support
๐Ÿ” kotlinc -version reports the compiler and JVM versions
๐ŸŽฏ Use -include-runtime to create a self-contained runnable JAR
installcompilersdkmanjvm

Continue with Kotlin

Save the full cheat sheet or work through every related task.

Back to the full Kotlin cheat sheet