Request Review: JDK-6479237 (cl) Add support for classloader names
David M. Lloyd
david.lloyd at redhat.com
Wed Oct 26 15:43:10 UTC 2016
On 10/26/2016 10:39 AM, Alan Bateman wrote:
> 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.
Hmm, that's an idea. I'll give it a shot, thanks.
--
- DML
More information about the jigsaw-dev
mailing list