Problem importing Gradle project using Eclipse 2021-06 (Java 16)+

I filed a bug on this issue back in July but since I haven’t gotten any response to it I figured I’d raise it here for some broader feedback. Maybe someone can tell me it’s not actually a bug and can give me a workaround.

Basically, Buildship doesn’t seem to work (at least for my project) when Eclipse is running an a Java version newer than 16. I get this error:

Caused by: java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x5839e94f) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x5839e94f

It looks like JDK changed in a way that hides something that Buildship needs.

(I’m running on MacOS, in case that matters.)

The full stack trace is in the bug linked to above.

Any ideas?

Thanks.

Nat

I replied on the GitHub issue.