Accessing class files for named modules

Michael Rasmussen michael.rasmussen at zeroturnaround.com
Mon May 2 14:45:15 UTC 2016


I can only agree with this.

We rely heavily on both ASM and Javassist, and resource lookup/loading
in general. While, as an agent, we can usually patch the bytecode to
poke holes where needed, having a supported way to read resource
bytes, similar to how getResourceAsStream works in jdk8, following the
same logic as the JVM uses to locate classes, would be very welcome,
so we wouldn't have to implement that kind of support for every single
classloader implementation out there.

Currently, we have some code in place, that enables us to get the
bytes for classes without knowing beforehand which module they are
defined in, by basically mapping packages to modules. At the moment,
this only works for named modules in the boot-layer though.

/Michael Rasmussen


More information about the jigsaw-dev mailing list