Does Kotlin support java 21 version in spring boot

Hi all,
Does Kotlin support java 21 version in spring boot 3.1.4.When I am trying to update java version 21 in spring boot with kotlin project ,I am getting below error.

That looks like an error from Gradle, not Kotlin. Does Gradle 8.2.1 support Java 21?

Very quick Google brought me to this: Compatibility Matrix

You need Gradle 8.4 or newer for Java 21.

Hi @Skater901 , still getting same error for gradle 8.4 version

Yeah sorry, I misread the compatibility matrix. You can use Gradle to compile/run Java 21, but the Gradle process itself won’t run on a Java 21 runtime. You’re using Gradle 8.2, so according to that matrix, the Java version that you use to run Gradle needs to be 19 or older. If you’re now using Gradle 8.4, you can use Java 20 to run Gradle, but you can’t use Java 21 to run Gradle.

@Skater901 thanks for this information .Which gradle version support java 21 ?

Please check the link I provided. It gives you all the information about which minimum Gradle version supports which Java version.