JPMS: --add-opens doesn't work for java.lang.reflect.InaccessibleObjectException
问题 I use Java 14 with Jetty 9.4 and Weld-servlet-shaded-3.1 and I get this exception: Caused by: 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 "opens java.lang" to module weld.servlet.shaded. According to answer here: https://stackoverflow.com/a/41265267/5057736 I tried to add --add-opens java.base/java.lang=ALL