Retrieving the bytes of platform classes
mark.reinhold at oracle.com
mark.reinhold at oracle.com
Mon Oct 23 18:00:22 UTC 2017
2017/10/23 10:55:15 -0700, alan.bateman at oracle.com:
> On 23/10/2017 18:48, Mark Raynsford wrote:
>> :
>>
>> In the olden days, we'd probably have gone rummaging in rt.jar, but
>> that was obviously a hack and wasn't future-proof. My tool is only
>> designed to work with JDK 9 and up.
>>
>> Note that I'm *not* asking to get from loaded Class<?> instances to
>> bytes: I'm analyzing classes statically and none of the analyzed
>> classes will actually be loaded by any ClassLoader.
>
> Have you looked at the jrt file system provider? Details in JEP 261 [1].
See also JEP 220:
http://openjdk.java.net/jeps/220#New-URI-scheme-for-naming-stored-modules-classes-and-resources
- Mark
More information about the jigsaw-dev
mailing list