For the first Kotlin/JVM program, use IntelliJ IDEA and a JDK. The IDE can configure the compiler and run the application for you.
What you need
- IntelliJ IDEA
- A JDK selected or downloaded during project creation
- An internet connection for required project downloads
Set up your environment
- Install IntelliJ IDEA through the link in the official Kotlin getting-started guide. Choose New Project, then Kotlin.
- Give the project a name. Select a JDK or use Download JDK. For a simple first console program, the IntelliJ build system is sufficient.
- Create or open Main.kt and replace its sample function with the code below.
- Click the Run icon beside main and read the output in the Run tool window.
Your first check
Save as Main.kt
fun main() {
println("Hello from w1coding.com")
}Run or verify
Run Main.kt using the IDE Run icon.Expected result: The Run window displays Hello from w1coding.com.
Common setup problems
- A missing JDK prevents a Kotlin/JVM project from building; check Project SDK.
- For command-line work, install the compiler separately and follow the official kotlinc guide.
Official documentation
Guide reviewed 17 November 2026. Check the linked vendor documentation for current supported versions and operating systems.