Review Request JDK-8228336: Refactor native library loading implementation

Alan Bateman Alan.Bateman at
Wed Mar 11 16:10:30 UTC 2020

On 10/03/2020 04:53, Mandy Chung wrote:
> Hi David,
> On 3/9/20 7:41 PM, David Holmes wrote:
>> That's a core-libs decision but I'm not sure that's a namespace we 
>> want to increase usage of.
> I'm open to other suggestion.  This helper method avoids the call to 
> doPrivileged when security manager is enabled and I think it's okay to 
> add this helper method in package.
BootLoader defines methods to correspond to the methods defined by 
ClassLoader so I don't think the loadLibrary method was too bad. 
Moreover it was very clear when calling BootLoader.loadLibrary that it 
would attempt to load it from the system path. I don't object to putting 
this in but it doesn't feel. If it is moved but I 
think we'll need to find better names so it's clear in the 20+ places 
where it used (and also avoid the temptation to use it in the modules 
that aren't mapped to the boot loader).


More information about the core-libs-dev mailing list