8281335: Allow a library already loaded via System::loadLibrary to be loaded as a raw library

Reviewed-by: sundar, mcimadamore
This commit is contained in:
Mandy Chung 2022-02-16 18:31:32 +00:00
parent 81645521c8
commit 980d187891
7 changed files with 215 additions and 98 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, Azul Systems, Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -2385,7 +2385,7 @@ public abstract class ClassLoader {
return null;
}
private final NativeLibraries libraries = NativeLibraries.jniNativeLibraries(this);
private final NativeLibraries libraries = NativeLibraries.newInstance(this);
// Invoked in the java.lang.Runtime class to implement load and loadLibrary.
static NativeLibrary loadLibrary(Class<?> fromClass, File file) {