# ktlint

Merlin (they)

10/01/2023, 9:49 PM
Hi, I'm trying to create a very simple custom ruleset, but when I run
../gradlew build
, I get this error
Copy code
> Failed to collect plugin requests of 'src/main/kotlin/ktlint-dokka.gradle.kts'
   > Ktlint_dokka_gradle has been compiled by a more recent version of the Java Runtime (class file version 64.0), this version of the Java Runtime only recognizes class file versions up to 61.0
I tried downloading Java 17, which this page indicates is class file version 61, but I still get the error. How can I fix this?


10/02/2023, 5:46 PM
you need 64, which is Java 20 (or 21)

Paul Dingemans

10/02/2023, 8:48 PM
I also have this problem regularly when running the build in IntelliJ. But after running the gradle build from the terminal running with java 20+, the build in IntelliJ also works again.