Reading bootstrap class bytecode from Java 7
Ess Kay
s.2016.kay at gmail.com
Tue Dec 6 02:07:07 UTC 2016
Are there any code snippets anywhere that demonstrate using Java 9's
jrt-fs.jar from within Java 8 to access Java 9 java.lang.Object? Cannot
find any using Google. Struggling to make this work.
On Mon, Dec 5, 2016 at 6:42 PM, Alan Bateman <Alan.Bateman at oracle.com>
wrote:
> On 05/12/2016 07:21, Remi Forax wrote:
>
> Hi,
>> Object.class.getClassLoader().getResourceAsStream(Object.class.getName().replace('.',
>> '/') + ".class")
>> should work across all jdks.
>>
>> This should work as before (ignoring the issue that
> Object.class.getClassLoader() will return null :-))
>
> However, as I read it, the original question involves a tool running on
> JDK 7 trying to access the .class files in a JDK 9 image. There isn't any
> supported way to do that, the tool needs to be on a minimum of JDK 8 as the
> jrtfs provider is compiled to 8.
>
> -Alan
>
More information about the jigsaw-dev
mailing list