Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which versions of Kotlin are compatible with which versions of the JDK?

Tags:

java

kotlin

I know Kotlin requires Java when running Kotlin. For example, I use Kotlin 1.4.0 and I use Java 14. However, I'm not sure about Kotlin and Java version compatibility.

Is there a Kotlin and Java version compatibility table?

I looked through the official document, but I couldn't find the information that I wanted.

like image 906
speed_star777 Avatar asked Sep 21 '20 09:09

speed_star777


1 Answers

Which versions of JVM does Kotlin target?

Kotlin lets you choose the version of JVM for execution. By default, the Kotlin/JVM compiler produces Java 8 compatible bytecode. If you want to make use of optimizations available in newer versions of Java, you can explicitly specify the target Java version from 9 to 18

https://kotlinlang.org/docs/reference/faq.html#which-versions-of-jvm-does-kotlin-target

like image 188
Michael Avatar answered Nov 10 '22 20:11

Michael