Before writing Kotlin code, you need to master the basics of programming, OOP concepts, and an understanding of the JVM. In this episode you set up the JDK, the Kotlin compiler, IntelliJ IDEA, and Gradle, then verify the installation with your first program.

Welcome to the Learn Kotlin series! This series will take you toward mastering Kotlin — a modern language that runs on the JVM and is the backbone of Android and backend development — from conceptual foundations to production readiness. In total there are 23 episodes organized into six phases.
But before writing the first line, there are a few basic skills and software tools you must prepare. Why are these prerequisites important? Because Kotlin isn't a standalone language: it's compiled into JVM bytecode, built with Gradle or Maven, and edited with an IDE like IntelliJ IDEA. Understanding this landscape of tools from the start will save you from confusion in the episodes that follow.
Episode 0 is your roadmap: we'll make sure your basic skills are in place, set up the JDK and the Kotlin compiler, install IntelliJ IDEA and Gradle, and verify everything with your first program. Once this episode is done, the entire series can be followed comfortably.
You should be comfortable with the fundamentals of programming: variables, conditions, loops, and functions. Kotlin expresses all of these with a more concise syntax than Java, so you don't need to worry about new syntax — what matters is that your logic is solid.
Then master Object-Oriented Programming: classes, objects, inheritance, and interfaces. Kotlin is a language that is both object-oriented and functional, so understanding OOP forms the foundation for absorbing features like data classes and sealed classes in episode 4.
Kotlin runs on the Java Virtual Machine (JVM). Understand that Kotlin code is compiled into bytecode, which is then executed by the JVM. This is what lets Kotlin call Java libraries and vice versa — an interoperability topic that will be covered in episode 17.
Finally, get comfortable with the command line, IDEs, and build tools. As a JVM developer, you'll live with kotlinc, java, and gradle every day. Verify all three with a single command:
java --version
kotlinc -version
gradle --versionThe java --version command shows the installed JDK, kotlinc -version shows the Kotlin compiler version, and gradle --version shows the build tool version. You'll use all three throughout the series.
Make sure JDK 11 or newer is installed. JDK 21 is the LTS choice most widely used for modern Kotlin projects. Use SDKMAN to manage multiple JDK versions easily:
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java 21.0.5-temAfter installation, verify with java --version. The output should show Temurin 21 or newer. If you're on another operating system, OpenJDK distributions like Temurin and Adoptium are available for all major platforms.
The Kotlin compiler (version 2.x) can be installed via SDKMAN or managed automatically by Gradle. For quick experiments in the terminal, install it via SDKMAN:
sdk install kotlin
kotlinc -versionkotlinc -version will show the version of the installed compiler. This compiler is useful for running a single .kt file without creating a full Gradle project — a pattern you'll use for quick practice in the early episodes.
Install IntelliJ IDEA Community Edition as your primary IDE. This IDE is made by JetBrains, the same company behind Kotlin, so its support is the most complete. Android Studio also provides good Kotlin support for Android development in episode 10.
For the build tool, Gradle is the standard choice in the Kotlin ecosystem. The gradle init command creates a new project, and gradle wrapper sets up a wrapper so the Gradle version is locked per project. You'll use both starting from episode 2.
Write your first program to make sure the entire toolchain works end to end:
fun main() {
val nama = "kotlin"
println("Halo, $nama!")
}Run it directly with the compiler:
kotlinc HelloKotlin.kt -include-runtime -d halo.jar
java -jar halo.jarIf the output shows Halo, kotlin!, your environment is ready. The kotlinc HelloKotlin.kt -include-runtime -d halo.jar command compiles the source into an executable JAR, and java -jar halo.jar runs it on the JVM.
One important note: make sure the JAVA_HOME variable points to the correct JDK, because the compiler and Gradle are very sensitive to this variable. Check it with echo $JAVA_HOME before continuing.
A recap of the prerequisites you've prepared in episode 0:
.kt files directly.If anything is still missing, stop and complete it before continuing. A solid foundation will make the next 22 episodes feel much lighter.
In episode 0 you've prepared the footing for the entire series: making sure your programming and OOP fundamentals are in place, understanding the JVM concept, installing the JDK and the Kotlin compiler, setting up IntelliJ IDEA and Gradle, and verifying the installation with your first program.
The key takeaways:
kotlinc for single files, Gradle for full projects..kt file and run it as a JAR.In episode 1 we'll discuss the history, background, and why to choose Kotlin — its evolution at JetBrains, comparisons with Java, Scala, and Swift, and the conciseness, null-safety, and interoperability advantages that make it dominant in Android and backend development. Make sure your environment is ready, because the Learn Kotlin journey is just beginning!