Skip to content
Browse files
8252412: [macos11] system dynamic libraries removed from filesystem
Co-authored-by: Dominik Röttsches <>
Reviewed-by: jiangli, valeriep
  • Loading branch information
Martin Buchholz and drott committed Jan 27, 2021
1 parent e1411fd commit c836da387e2803e3f4eaa8918650a3ebcda8b216
Showing 1 changed file with 19 additions and 1 deletion.
@@ -110,8 +110,26 @@ private static String getLibraryName() throws IOException {
// if LIB2 exists, use that
return lib;

// As of macos 11, framework libraries have been removed from the file
// system, but in such a way that they can still be dlopen()ed, even
// though they can no longer be open()ed.
// """New in macOS Big Sur 11.0.1, the system ships with a built-in
// dynamic linker cache of all system-provided libraries. As part of
// this change, copies of dynamic libraries are no longer present on
// the filesystem. Code that attempts to check for dynamic library
// presence by looking for a file at a path or enumerating a directory
// will fail. Instead, check for library presence by attempting to
// dlopen() the path, which will correctly check for the library in the
// cache."""
// The directory structure remains otherwise intact, so check for
// existence of the containing directory instead of the file.
if (new File(lib).isFile()) {
if (new File(lib).getParentFile().isDirectory()) {
// if PCSC.framework exists, use that
return lib;

1 comment on commit c836da3

Copy link

@openjdk-notifier openjdk-notifier bot commented on c836da3 Jan 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.