Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Could not initialize class org.codehaus.groovy.runtime.InvokerHelper" on JDK 14 #12599

Closed
christianhujer opened this issue Mar 22, 2020 · 8 comments
Labels

Comments

@christianhujer
Copy link

Expected Behavior

Gradle works on JDK 14

Current Behavior

Gradle does not work on JDK 14

Context

I tried to upgrade a Gradle project to JDK 14.

Steps to Reproduce

Create a simple Gradle project by creating the following build.gradle file:

plugins {
    id 'java'
}

group 'some.group'
version '0.0.1-SNAPSHOT'

sourceCompatibility = 14

repositories {
    mavenCentral()
}

Run it using gradle --scan or something like that.

Your Environment

Build scan URL: not available, as gradle --scan fails.
The following file stderr.txt was produced by, using the following build.gradle.txt as build.gradle:

./gradlew --stacktrace --info --debug >stderr.txt 2>&1

build.gradle.txt
stderr.txt

@christianhujer
Copy link
Author

Closing this issue. I've just tried Gradle 6.3-rc-4 and it works just fine with JDK 14.

@fmdelvalle
Copy link

fmdelvalle commented May 29, 2020

Same issue with openjdk version "14.0.1" 2020-04-14, brand new installation, on Windows.
Fixed by editing gradle-wrapper.properties to download the 6.3 version as suggested in https://stackoverflow.com/questions/35000729/android-studio-could-not-initialize-class-org-codehaus-groovy-runtime-invokerhel

@alexmccabe
Copy link

Downgrading to JDK11 also resolves the issue

@arecastudio
Copy link

Thank you, downgrade to version 11 really solve my problem

@Qasim-Yousaf
Copy link

Closing this issue. I've just tried Gradle 6.3-rc-4 and it works just fine with JDK 14.

Thanks it work

@QuditWolf
Copy link

Same issue with gradle 7.0 , on jdk 15.0.2...
./gradlew build --debug gives
debug.txt

@markw101
Copy link

markw101 commented Jul 5, 2021

I took advice of christianhujer and downloaded gradle 6.3 and java jdk 14. Downloaded them from here: https://jdk.java.net/archive/ and https://gradle.org/releases/ I was then able to run gradle wrapper with no issues. Thanks for your assistance christianhujer. Cheers!

@nebadi420
Copy link

Downgrading to JDK11 also resolves the issue

Thank you soooo much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants