Reading bootstrap class bytecode from Java 7
Remi Forax
forax at univ-mlv.fr
Mon Dec 5 07:21:37 UTC 2016
Hi,
Object.class.getClassLoader().getResourceAsStream(Object.class.getName().replace('.', '/') + ".class")
should work across all jdks.
cheers,
Rémi
----- Mail original -----
> De: "Sundararajan Athijegannathan" <sundararajan.athijegannathan at oracle.com>
> À: jigsaw-dev at openjdk.java.net
> Envoyé: Lundi 5 Décembre 2016 05:16:18
> Objet: Re: Reading bootstrap class bytecode from Java 7
> Hi,
>
> http://openjdk.java.net/jeps/220 clearly states this:
>
> "For tools that support the development of code for JDK 9 but which
> themselves run on JDK 8, a copy of this filesystem provider suitable for
> use on JDK 8 will be placed in the root directory of JDK 9 run-time
> images, in a file named |jrt-fs.jar|."
>
> jrt-fs.jar in jdk9 is not meant to be used with jdk 7. You've to migrate
> your tool/application to JDK 8 to use jrt provider from JDK 9.
>
> -Sundar
>
> On 12/5/2016 9:39 AM, Ess Kay wrote:
>> I am working on a utility currently running on Java 7 which will need to be
>> able process Java 9 classes and read the Java 9 bootstrap class bytecode
>> (e.g. java.lang.Object).
>>
>> Is there a stable, "official" way to read the Java 9 bytecode from Java 7
>> where there is no "jrt" provider? Also, is there a stable, "official" way
>> in which the user can specify the location of the Java 9 modules? Obviously
>> "java.home" will point to the Java 8.
>>
> > - Svet
More information about the jigsaw-dev
mailing list