actions / setup-java

Set up your GitHub Actions workflow with a specific version of Java
MIT License
1.47k stars 708 forks source link

java.lang.IllegalAccessError: superclass access check failed with `setup-java@v4` #626

Open alghe-global opened 2 months ago

alghe-global commented 2 months ago

Description: A clear and concise description of what the bug is.

Task version: Specify the task version

Platform:

Runner type:

Repro steps:
Run gradle build with setup-java@v4

Expected behavior: Gradle build to succeed (succeeds with setup-java@v3)

Actual behavior: Error is thrown:

e: java.lang.IllegalAccessError: superclass access check failed: class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x7c548429) cannot access class com.sun.tools.javac.main.JavaCompiler (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.main to unnamed module @0x7c548429

seems it relates to https://youtrack.jetbrains.com/issue/KT-60507/Kapt-IllegalAccessError-superclass-access-check-failed-using-java-21-toolchain

HarithaVattikuti commented 2 months ago

Hello @alghe-global Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.

alghe-global commented 2 months ago

Am I the only one who tried adopting v4 and encountered this issue?