title: Errors when running Eclipse on Java 17
body: <p>I get errors when I try to start Eclipse 2021-06 (4.20.0) on a Java 17 JRE.</p>
  <p>The errors show in a dialog and the <em>Error Log</em>:</p>
  <p><a href="https://i.stack.imgur.com/nq7oN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nq7oN.png" alt="Screen shot" /></a></p>
  <p>How can I fix this?</p>
  <p>The contents of the error messages is this:</p>
  <pre><code>java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not &quot;opens java.lang&quot; to unnamed module @2bc378f7
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.overrideLoadResult(ModuleClassLoader.java:86)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
      at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:11750)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12949)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:13176)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:13133)
      at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:11521)
      at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:850)
      at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:394)
      at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
      at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
      at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:377)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:214)
      at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:309)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:79)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:272)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:192)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  </code></pre>
  <pre><code>java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int) throws java.lang.ClassFormatError accessible: module java.base does not &quot;opens java.lang&quot; to unnamed module @2bc378f7
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
      at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
      at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.overrideLoadResult(ModuleClassLoader.java:86)
      at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
      at org.eclipse.jdt.internal.compiler.parser.Parser.endParse(Parser.java:11750)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12949)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:13176)
      at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:13133)
      at org.eclipse.jdt.internal.compiler.parser.Parser.dietParse(Parser.java:11521)
      at org.eclipse.jdt.internal.compiler.Compiler.internalBeginToCompile(Compiler.java:850)
      at org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:394)
      at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:444)
      at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:426)
      at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:377)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:214)
      at org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:309)
      at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:79)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:272)
      at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:187)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  </code></pre>
  <pre><code>java.lang.reflect.InaccessibleObjectException: Unable to make field private static volatile java.net.Authenticator java.net.Authenticator.theAuthenticator accessible: module java.base does not &quot;opens java.net&quot; to unnamed module @1ab8b487
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
      at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
      at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
      at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
      at net.sf.eclipsecs.core.config.configtypes.RemoteConfigurationType$RemoteConfigAuthenticator.getDefault(RemoteConfigurationType.java:376)
      at net.sf.eclipsecs.core.config.configtypes.RemoteConfigurationType.getCheckstyleConfiguration(RemoteConfigurationType.java:99)
      at net.sf.eclipsecs.core.config.CheckConfiguration.getCheckstyleConfiguration(CheckConfiguration.java:161)
      at net.sf.eclipsecs.core.builder.CheckerFactory.getCacheKey(CheckerFactory.java:157)
      at net.sf.eclipsecs.core.builder.CheckerFactory.createChecker(CheckerFactory.java:99)
      at net.sf.eclipsecs.core.builder.Auditor.runAudit(Auditor.java:139)
      at net.sf.eclipsecs.core.builder.CheckstyleBuilder.handleBuildSelection(CheckstyleBuilder.java:307)
      at net.sf.eclipsecs.core.builder.CheckstyleBuilder.build(CheckstyleBuilder.java:173)
      at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:846)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:229)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:277)
      at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:330)
      at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
      at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:333)
      at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:385)
      at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:406)
      at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:154)
      at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:244)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
  </code></pre>