java.lang.ExceptionInInitializerError with Java-16 | j.l.ClassFormatError accessible: module java.base does not “opens java.lang” to unnamed module

Since JDK 16, the default for the –illegal-access option is deny, so “deep reflection” to JDK classes fails. You can override the behavior by specifying –illegal-access=permit, but you have to be aware of JEP 403: Strongly Encapsulate JDK Internals which is about closing that possibility in a future version, so this option is only a temporary … Read more