This no longer happens with current builds of EA Java 9. Class files are now always localized, even if they are encapsulated in a module.
This is a consequence of the encapsulation of the Java 9 module, where non-exportable resources are no longer available through the ClassLoader API. Under the covers Javassist calls
ClassLoader.getSystemClassLoader().findResource("java/io/Serializable.class");
to get the class file for Serializable . He then parses this class file and presents the information similar to the Java reflection API, but without loading the class so that it can be edited before it is loaded.
Prior to Java 8, this class file was available since most class loaders rely on finding the class file before loading it, so the above call returned a URL pointing to the file. Since Java 9, the resources of named modules are only available through the new findResource(String, String) API method, where the second argument names the module of this class.
Short answer: Javassist no longer works with Java 9, and none of its dependent projects will be. This is a known issue with the current implementation of Java 9 and will hopefully be fixed before release.
source share