-Xpatch with jar, jimage, or other non-exploded format?
Alan Bateman
Alan.Bateman at oracle.com
Fri Dec 4 22:12:29 UTC 2015
On 04/12/2015 19:56, Michael Rasmussen wrote:
> The usage of -Xpatch is to be a replacement for -Xbootclasspath/p, to
> enable to patch boot CP classes, but at the moment it only seems to
> support pointing to an "exploded" directory, containing the individual
> .class files.
>
> Are there any plans to extend this to also support some kind of container
> format, for instance .jar or even .jimage?
>
> For systems which relies on patching more than just a few classes,
> exploded mode becomes rather clumpsy very quickly. The JVM is perfectly
> capable of reading from these container formats, so why was the -Xpatch
> option limited to exploded directory?
In the current prototype then -Xpatch supports directories of exploded
classes only. I suspect that once there is more usage for testing that
we will need to look at adding support for packaging patches in JAR
files. The jimage format is very JDK-internal so it wouldn't make sense
for a jimage container to exist outside of the run-time image. One other
thing to say about -Xpatch is that it's much more powerful than
-Xbootclasspath/p because it independent on class path, you'll find it
can be used to patch modules defined to any of the built-in class loaders.
-Alan.
More information about the jigsaw-dev
mailing list