I have issue with these versions jdk 22 & gradle 8.7 it's not working and give me this issue ( Unsupported Java. Your build is currently configured to use Java 22 and Gradle 8.7.

Possible solution: - Use Java 21 as Gradle JVM: Open Gradle settings - Open Gradle wrapper settings, change distributionUrl property to use compatible Gradle version and reload the project )

Comment From: bclozel

I don't think Gradle 8.7 supports Java 22 as a runtime, only as toolchain for now. You should run Gradle with Java 21 and compile your code with toolchain support.

Comment From: wilkinsona

https://github.com/spring-projects/spring-boot/issues/40074 is also relevant here.