Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60

Viewed 3064

Configuration : Java : 16
Gradle : 7.2
Jacoco : 0.8.4

When I upgraded my project from openJDK8 to openJDk16 I see the following issues :

"Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 60"

And also the below issue :
java.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/security/ec/SunEC$1. at org.jacoco.agent.rt.internal_035b120.CoverageTransformer.transform(CoverageTransformer.java:93) at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244

1 Answers

I had a similar problem and fix it by chaining Gradle JVM settings in my preferred IDE which is IntelliJ (should be possible with others too):

  1. In the Settings/Preferences dialog, go to Build, Execution, Deployment | Build Tools | Gradle.

  2. Under the Gradle section, change the Gradle JVM option.

If you are using Intellij you can see more on this topic here

Related