JVMTI GetModuleByPackageName -- plans for Instrumentation API equivalent?

Andrew Dinn adinn at redhat.com
Wed Jun 22 11:21:11 UTC 2016


On 22/06/16 11:16, Michael Rasmussen wrote:
> . . .
> A common approach to this pre-jigsaw, was simply to translate the
> classname to a filename and ClassLoader::getResourceAsStream; but with
> named modules, this is no longer the case, we now have to know which
> Module that class is in in order to get the bytes
> (#ClassFilesAsResources, #ResourceEncapsulation etc).

That's always been a rather ropy solution (since it doesn't work for
some classloader configurations) but it is by far the best available option.

> Adding a GetModuleByPackageName equivalent method would go some way to
> help with this issue.

I agree this would be very helpful.

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the jigsaw-dev mailing list