RFR: 8156499 Update jlink to support creating images with modules that are packaged as multi-release JARs

Steve Drach steve.drach at oracle.com
Mon Aug 22 18:24:42 UTC 2016


>> If there is a class in a versioned directory that is not in the base directory, then that class must not be public or protected.  It’s not part of the public interface of the multi-release jar.
> It's also a modular JAR and so if the class is not in an exported package then it's okay for it to be public.

So, if a class is not in an exported package, it’s in a concealed package, is that right?  So, should any classes in a concealed package, public or not, be included in the versionedStream used in jlink?

> 
> 
>> It exists purely because another class in the same versioned directory depends on it.  If we are creating a versionedStream for the version that the non-public class is in, it will be in finalNames, otherwise it won’t be.  I believe the code is correct here.
>> 
>> New concealed packages can be added in a versioned section of the jar file created by jar tool.  Should classes in concealed packages be added to finalNames or not?  Or stated differently, for jlink, should a versionedStream contain entries in concealed packages?
>> 
> Er, I thought the plan was for the set of concealed packages to be the same. It's okay for the ConcealedPackages in the base section to include "empty" packages.

I wasn’t involved with that decision.  Chris wrote that code, perhaps he can comment.


More information about the jigsaw-dev mailing list