Intellij - running a project after java upgrade fails

Viewed 26

I have a project with 3 modules. I am running them with Intellij. Everything worked fine until project was upgraded to java 17, I ran following commands in terminal:

sdk install java 17.0.3-tem
sdk use java 17.0.3-tem

In Intellij preferences Compiler -> Java Compiler -> Project bytcode version is set to 17 as well as all per module bytecode target versions.

I have tried to use both javac and eclipse compiler, also I have set the Gradle Jvm to temurin-17 in Intellij Build Tools -> Gradle, but I still get an error:

Error: LinkageError occurred while loading main class glow.MainKt
    java.lang.UnsupportedClassVersionError: myproject/MainKt has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 58.0

What else do I need to do in order to get rid of this error?

0 Answers
Related