cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

Pregel 'Unsupported class file major version 62' error with JDK 16, Gradle 7.4.2

cuneyttyler
Ninja
Ninja

I'm trying to build pregel-bootstrap here : graph-data-science/examples/pregel-bootstrap at master · neo4j/graph-data-science · GitHub

First, it cannot find packages with the gdsVersion = '2.1.0-alpha04' parameter specified in build.gradle. So I changed the version to 2.04 and then it can find the packages. But this time, when I run ./gradlew shadowJar to build, it says 'Unsupported class file major version 62'. I checked this and only found with version 60 and it says that it's related to gradle version and gradle JVM version. I both tried jdk 11 and jdk 16 for gradle jvm and it gives the same error. I also tried with Gradle 7.0.

Which gradle, gradle-jvm and jdk version should I use in order to be able to build a pregel project with GDS version 2.0.4?

1 ACCEPTED SOLUTION

cuneyttyler
Ninja
Ninja

I found the issue. It seems that 'Unsupported class file major version 62' error is thrown when you use java 18 to compile the code. And even if I have chosen java 11 in intellijidea as gradle jvm and project jdk, it probably was hooked with java 18. When I completely delete java and reinstall 11 it worked.

View solution in original post

1 REPLY 1

cuneyttyler
Ninja
Ninja

I found the issue. It seems that 'Unsupported class file major version 62' error is thrown when you use java 18 to compile the code. And even if I have chosen java 11 in intellijidea as gradle jvm and project jdk, it probably was hooked with java 18. When I completely delete java and reinstall 11 it worked.