https://kotlinlang.org logo
#getting-started
Title
# getting-started
a

Ayden

03/05/2022, 3:27 AM
Hello everyone. I encounter the error when using
JDK 17
and
Gradle 7.3.3/7.4
,
Unsupported class file major version 61
. I think the solution to resolve this is to downgrade the JDK version to 11 after searching through the internet. What should I do to resolve this issue if I insist to use JDK 17. I am using WSL2, with the following setup for my console application.
Copy code
JDK: 17
Build System: Gradle Groovy
Target JVM version: 16
v

Vampire

03/05/2022, 3:40 AM
Major version 61 is Java 17. So your error means you are trying to use a class compiled for Java 17 with some older Java at runtime. Where exactly do you get that error? And has it actually anything to do with Kotlin?
☝️ 1
a

Ayden

03/05/2022, 7:12 AM
I think it is more like a JDK specific.
109 Views