Support for jrt-fs.jar in JDK 7 would be very helpful in allowing FindBugs to run under Java 9
Andrey Loskutov
loskutov at gmx.de
Mon Nov 17 20:23:37 UTC 2014
On Monday 17 November 2014 11:36:02 mark.reinhold at oracle.com wrote:
> Paths in a jrt: filesystem include module names, but JDK 7 and JDK 8
> don't have modules, so a jrt: provider on those versions would either
> have to try to map class and resource files to modules (ugh), or else
> omit the module name, or else use some artificial name ("default",
> "boot", whatever, ...). In the latter two cases, tools that use the
> jrt: filesystem will have to do something different on JDK >= 9 vs.
> JDK < 9, so I'm not sure we'd be helping them much by providing jrt:
> views of older releases. It'd be less work for all involved if they
> just keep their current rt.jar/tools.jar-reading code.
Interesting - I've completely missed the point that the jrt: paths will
*always* include module names. Hmm.. Looks like there is no reason to use jrt:
urls on any JDK for FindBugs.
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?
--
Kind regards,
google.com/+AndreyLoskutov
More information about the jigsaw-dev
mailing list