al3xtjames / ghidra-firmware-utils

Ghidra utilities for analyzing PC firmware
Other
401 stars 45 forks source link

why I have to downgrade to jdk17 instead of jdk20 else i get the error #27

Closed kocoman2 closed 1 year ago

kocoman2 commented 1 year ago

why I have to downgrade to jdk17 instead of jdk20 else i get the error

BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 64

thx

al3xtjames commented 1 year ago

Can you post the full output? Is this while running ./gradlew? I tried OpenJDK 20 and the build appears to work here:

❯ java --version
openjdk 20.0.1 2023-04-18
OpenJDK Runtime Environment Homebrew (build 20.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 20.0.1, mixed mode, sharing)

❯ ./gradlew
Starting a Gradle Daemon (subsequent builds will be faster)

> Task :compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :buildExtension

Created task ':buildExtension' property 'archiveBaseName'.task ':buildExtension' property 'archiveExtension' in task ':buildExtension' property 'destinationDirectory'

BUILD SUCCESSFUL in 5s
7 actionable tasks: 7 executed
Najsztub commented 1 year ago

Hi!

I had the same error with jdk20. After changing gradle-wrapper.properties file in gradle/wrapper folder to a newer gradle binary link I was able to successfully build the plugin.

I changed the distributionUrl to distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip

al3xtjames commented 1 year ago

Thanks for the info. I've updated the Gradle wrapper to 8.0.1 (by running gradle wrapper). Let me know if there are other issues with JDK 20.