Issue
I'm trying to build the application with Java SE 11 and Gradle 7.0, and it builds using the IDE however when I try to build it using the terminal I get this error. How can I fix it.
java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x1d7a8227) 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 @0x1d7a8227
Solution
Downgrading from open jdk 17 to 11 worked for me.
Answered By - Manoj
Answer Checked By - Gilberto Lyons (JavaFixing Admin)