Support for jrt-fs.jar in JDK 7 would be very helpful in allowing FindBugs to run under Java 9

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 20 14:23:07 UTC 2014


On 17/11/2014 20:23, Andrey Loskutov wrote:
> :
>
> If FindBugs needs to read the bytecode of the java.sql.Array class from JDK 9,
> how we can address it *without* knowledge to which module it belongs? We would
> never know the module names, but only class names from bytecode, or I'm wrong
> here?
>
> At the end, the *only* reliable way to get the bytecode of the class file for
> a given class name from JDK 9 classes would be to use the
> Classloader.getSystemResource("full/qualified/class/Name.class") and this will
> mean: to analyze JDK 9 we *must* run on JDK 9?
>
> I'm missing something trivial?
>
There is some TBD here, most likely the file system will need to provide 
file paths to get to the class files without knowing the module name.

The workaround for tools don't know anything about modules yet is to 
just construct a class path of /$MODULE/* . The additional searching 
might mean a bit of a performance hit but should be equivalent to 
today's searching of ${java.home}/**/*.jar.

-Alan


More information about the jigsaw-dev mailing list