title: Execution failed for task ':app:compileJava' with ./gradlew run
body: <p>When I try using &quot;./gradlew run&quot; on my gradle projects, I receive this error:</p>
  <pre><code>* What went wrong:
  Execution failed for task ':app:compileJava'.
  &gt; java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x1fa4cfc5) 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 @0x1fa4cfc5
  </code></pre>
  <p>I have tried on multiple different projects and it still doesn't work. I believe it has something to do with gradle expecting a different version of Java, as I am using java 16 and when I check &quot;gradle -v&quot; it says &quot;JVM: 15.0.2&quot;. I am not sure how to fix this or if this is even the problem. Any help would be greatly appreciated!</p>