Skip to content
AgileLogics
4 min read

Installing Kotlin

This course targets Kotlin 2.x (the examples use Kotlin 2.2). Newer 2.x releases work too.

Kotlin programs run on the Java Virtual Machine (JVM), so you need a JDK (Java Development Kit) — version 17 or 21 is a good choice.

The easiest route: IntelliJ IDEA

Install IntelliJ IDEA from jetbrains.com — the free version is enough. When you create a new Kotlin project, it downloads a JDK and the Kotlin compiler for you. This is the recommended setup for this course.

For Android development, install Android Studio instead, which is built on IntelliJ IDEA and includes Kotlin.

The command-line compiler (optional)

To compile from a terminal, install a JDK (for example, Eclipse Temurin from adoptium.net), then the Kotlin compiler:

  • macOS — brew install kotlin
  • Linux / macOS — sdk install kotlin using SDKMAN!
  • Windows — download kotlin-compiler-<version>.zip from the Kotlin GitHub releases page, unzip it, and add its bin folder to your PATH.

Check it:

kotlinc -version
info: kotlinc-jvm 2.2.0 (JRE 21.0.5+11-LTS)

No installation at all

The Kotlin Playground at play.kotlinlang.org runs Kotlin in your browser. It's perfect for trying the examples in these lessons.