JNDI allows the environment to create an initial context being initialized with applet parameters (see javax.naming.InitialContext for details). The results in an undesirable dependency on the java.applet.Applet.
It's time to examine this and maybe just remove the support for Applet properties from JNDI. Clearly this would be an incompatible change but it is unlikely to be used.
If it cannot be removed then we at least need to look at the Core Reflection usage in com.sun.naming.ResourceManager and work out how this optional dependency will work with modules.