You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First attemp to build the model (./gradlew build), I got the following error:
> startup failed:
General error during semantic analysis: Unsupported class file major version 66
java.lang.IllegalArgumentException: Unsupported class file major version 66
JVM and gradle versions I am using (./gradlew -version):
------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC
Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 22.0.2 (Homebrew 22.0.2)
OS: Mac OS X 14.3 aarch64
How I resolve this issue
Install java@11: $ brew install openjdk@11
Add JAVA_HOME path in my ~/.zshrc file: append this line in the .zshrc file: export JAVA_HOME="/opt/homebrew/opt/openjdk@11/" (change the java exe path if need)
source ~/.zshrc
Confirm using JVM@11. ./gradlew -version
------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC
Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 11.0.24 (Homebrew 11.0.24+0)
OS: Mac OS X 14.3 aarch64
Next steps
Add this to README.md file for developers.
The text was updated successfully, but these errors were encountered:
This question specifically is a Gradle issue, where the latest version of Gradle 8.5 is not compatible with Java SE 22 (major version 66). I think that is outside the scope of our README.
However, the Java version for this project (SE 8) could potentially be added to the README? @jessicasyu
@jessicasyu my thoughts have somewhat changed on this issue, I think that the java version is sufficiently handled by the sourceCompatibility parameter in our gradle file rather than adding another redundant location to maintain with the JDK version. Do you have a different opinion on this? I haven't found a good example of people specifying a JDK in other open source projects separate from the gradle file. If you don't have strong feelings I'll think we should close this issue.
@cainja I'm all for having a single source of truth. We could consider adding a badge to the README that automatically displays the value of sourceCompatibility which addresses both concerns (not having redundant information and making the java version more prominent)
First attemp to build the model (./gradlew build), I got the following error:
JVM and gradle versions I am using (./gradlew -version):
How I resolve this issue
$ brew install openjdk@11
export JAVA_HOME="/opt/homebrew/opt/openjdk@11/"
(change the java exe path if need)source ~/.zshrc
./gradlew -version
Next steps
Add this to README.md file for developers.
The text was updated successfully, but these errors were encountered: