Request Review: JDK-6479237 (cl) Add support for classloader names
Alan Bateman
Alan.Bateman at oracle.com
Wed Oct 26 15:39:22 UTC 2016
On 26/10/2016 16:28, David M. Lloyd wrote:
> :
>
> Some background is in order I guess. I've been reworking a couple of
> our projects to support both Java 9 and Java 8, using MR JARs and also
> without MR JARs. In the MR JAR case it's been easiest (so far) to
> push off the JDK-version-specific stuff into a nonpublic "JDKSpecific"
> class which gets replaced under Java 9. However, because the
> ClassLoader change requires a new constructor to be called, I actually
> have to put the whole ClassLoader implementation into the MR
> supplement, which is pretty clunky at best and might introduce some
> tricky build difficulties at worst.
Can you introduce an intermediate ClassLoader into the type hierarchy?
The 8 version will just invoke super(), the 9+ version will invoke
super(name). That would keep the JDK-specific code to a minimum.
-Alan
More information about the jigsaw-dev
mailing list