Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kotlin SDK vs Java SDK

In Intellij’s project structure settings I have a choice between Java SDK (from OpenJDK) and Kotlin SDK (from Kotlin plugin?). Which should I use for Kotlin application and what is the difference?

project structure screenshot

like image 203
omnichord Avatar asked Oct 15 '25 17:10

omnichord


1 Answers

If I recall correctly, Kotlin SDK in IDEA is used in non-JVM modules, like Kotlin/JS or Kotlin/Native. If you are developing for Kotlin/JVM, you should pick corresponding JDK in project structure and add kotlin-stdlib either as a dependency in Gradle / Maven or via IDEA assistant if you don't use any external build system (you'll see "Kotlin not configured" bar if it needs additional setup).

like image 164
r4zzz4k Avatar answered Oct 18 '25 08:10

r4zzz4k