Re: Retrieving the bytes of platform classes

2017-10-26 Thread Volker Simonis
>From within Java (i.e. for the current VM) you could simply do: ClassLoader.getSystemResourceAsStream("java/io/InputStream.class") Regards, Volker On Tue, Oct 24, 2017 at 3:47 AM, Sundararajan Athijegannathan wrote: > A simple nashorn sample to extract single .class using jrt file system > pr

Re: Retrieving the bytes of platform classes

2017-10-23 Thread Sundararajan Athijegannathan
A simple nashorn sample to extract single .class using jrt file system provider: https://blogs.oracle.com/sundararajan/extracting-a-single-class-file-from-java9-platform-jimage-modules-file -Sundar On 23/10/17, 11:25 PM, Alan Bateman wrote: On 23/10/2017 18:48, Mark Raynsford wrote: : In th

Re: Retrieving the bytes of platform classes

2017-10-23 Thread Mark Raynsford
On 2017-10-23T11:00:22 -0700 mark.reinh...@oracle.com wrote: > 2017/10/23 10:55:15 -0700, alan.bate...@oracle.com: > > 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-module

Re: Retrieving the bytes of platform classes

2017-10-23 Thread mark . reinhold
2017/10/23 10:55:15 -0700, alan.bate...@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 t

Re: Retrieving the bytes of platform classes

2017-10-23 Thread Alan Bateman
On 23/10/2017 18:55, Alan Bateman wrote: Details in JEP 261 [1]. Sorry, I meant JEP 220 (http://openjdk.java.net/jeps/220).

Re: Retrieving the bytes of platform classes

2017-10-23 Thread Alan Bateman
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 ana