Review Request JDK-8228336: Refactor native library loading implementation

Mandy Chung mandy.chung at
Tue Mar 10 04:53:32 UTC 2020

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.

>> Webrev:
> Overall refactoring looks okay to me. A couple of minor things I noticed:
> src/java.base/share/classes/java/lang/
> !                     " in java.library.path: " + 
> StaticProperty.sunBootLibraryPath());
> s/java/sun.boot/

Thanks for catching this.

> src/java.base/share/classes/java/lang/
> I don't see the point in changing load0 and loadLibrary0 to return 
> NativeLibrary when it is unused. Is this to allow for direct use of 
> these methods in the future?

It was leftover from my early prototype.   It's not intended to change.  
I have fixed it.

This new webrev includes the above minor fixes and a few windows/solaris 
specific files I missed from webrev.00:


More information about the core-libs-dev mailing list