Kotlin Setup and First Program

Harry · 23 Sep 2026 · 3 views
Log in to track your progress and mark lessons complete.

Install the JDK

Kotlin needs a JDK 17+ underneath. Verify with java -version, then pick one path below.

Option 1: IntelliJ IDEA (Recommended)

  • Install IntelliJ Community (free) - Kotlin plugin is built in.
  • New Project, language Kotlin, build system IntelliJ or Gradle.
  • Write main.kt, press Run - zero configuration.

Option 2: Command Line Compiler

# install via SDKMAN or brew, then:
kotlinc hello.kt -include-runtime -d hello.jar
java -jar hello.jar

Option 3: Online Playground

Learn syntax instantly at play.kotlinlang.org - no install at all. Perfect for the first five lessons of this tutorial.

Your First Program

fun main() {
    println("Hello, GroovyGrails learner!")
}

No classes, no semicolons, no public static void ceremony.

Three ways to start Kotlin - IntelliJ, kotlinc, playground

Key Points

  • IntelliJ gives the smoothest start; playground is fastest.
  • Every example here runs with plain kotlinc too.
  • Always match the JDK version to your tutorial series.
Share this post:

Comments (0)

Please login or register to comment.

Create a free account to keep reading

You've enjoyed a free tutorial! Register (it's free) to unlock every tutorial, track your progress and save code.

or sign in with your account

Already have an account? Log in