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
When building the project using Java 21 with the current Kotlin version, the following error occurs:
superclass access check failed:
class org.jetbrains.kotlin.kapt3.base.javac.KaptJavaCompiler (in unnamed module @0x36ee51e2)
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 @0x36ee51e2
at java.base/
Environment
Java version: 21
Kotlin version: 1.9.10
Gradle version: 8.0
Operating System: MacOS 15.3.1 (24D70)
Steps to Reproduce
Set up the project having the SDK set globally with Java 21.
Use the specified Kotlin version.
Run the build process.
Expected Behavior
The project should build successfully without compatibility issues.
Actual Behavior
The build fails with the superclass access check failed error due to module access restrictions in Java 21.