Eclipse Google Cloud plugin Unable to start DevAppServer: InaccessibleObjectException: Unable to make static

Trying to get a basic setup working to run the local Google App Engine running in Eclipse using the Google Cloud Tools for Eclipse, but I keep getting the error below when starting the server using the Run As -> App Engine option.

I believe my environment is good because I am able to run the test application with a local app server from the command line using the java_dev_appserver command, so the problem seems specific to the Eclipse environment.

Caused by: java.lang.ExceptionInInitializerError
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(
    at java.base/java.lang.reflect.Constructor.newInstance(
    ... 5 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make static accessible: module java.base does not "opens" to unnamed module @49c43f4e
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(
    at java.base/java.lang.reflect.Method.checkCanSetAccessible(
    at java.base/java.lang.reflect.Method.setAccessible(
    ... 12 more

I started from a clean Windows 11 machine, installed Google Cloud SDK, added the app-engine-java component, configured a project, tested by deploying to the cloud with the CLI, installed Eclipse, added the Google Tools for Eclipse plugin, created a sample project using the Google plugin Create Project -> Google App Engine Standard project, and tried to run it.

This is probably very simple but I can't figure it out.


  • The problem was happening with JRE v17 that installs by default with Eclipse 2021-12. Installing Eclipse with JRE v11 solved the problem. Thanks to greg-449 for putting me on the right track.