Java 9 webstart JNLP Service produces IllegalAccess
问题 The following code (to retrieve the base URL of a Java Web Start client application via the JNLP API) worked in Java 8 but failed when executed in (modularized) Java 9 runtime: Class<?> mclass = Class.forName("javax.jnlp.ServiceManager"); Method lookup = mclass.getMethod("lookup", new Class[]{String.class}); Object basicSvc = lookup.invoke(null, new Object[{"javax.jnlp.BasicService"}); Class<?> sclass = basicSvc.getClass(); Method getCodeBase = sclass.getMethod("getCodeBase", (Class[])null);