8275703: System.loadLibrary fails on Big Sur for libraries hidden from filesystem

Reviewed-by: dholmes, alanb, mcimadamore
This commit is contained in:
Mandy Chung 2021-10-28 15:27:26 +00:00
parent abe52aea23
commit 309acbf0e8
10 changed files with 199 additions and 32 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -31,6 +31,14 @@ class ClassLoaderHelper {
private ClassLoaderHelper() {}
/**
* Returns true if loading a native library only if
* it's present on the file system.
*/
static boolean loadLibraryOnlyIfPresent() {
return true;
}
/**
* Returns an alternate path name for the given file
* such that if the original pathname did not exist, then the