Skip to content

How to run Aeron code with JDK 16 and JDK 17


JDK 16 changed the default access to the sun package to deny - it used to be a warning. When running Aeron code on JDK 16 you may get an error similar to the following:

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Set accessible: module java.base does not "opens" to unnamed module @XXXXXX


Add --add-opens java.base/ or --illegal-access=permit (JDK 16 only) to the JVM arguments.


JDK 16 - via JEP 396 - strongly encapsulates JDK internals used by Agrona's TransportPoller. To enable Aeron to run without error, you will need to permit access or explicitly open

With JDK 17, --illegal-access=permit can no longer be used (see JEP 403), however, --add-opens java.base/ is expected to work.

See Also