JDK internals wrap System.loadLibrary in a PrivilegedAction in quite a few places, and whether we use a lambda or an anonymous class, we'll be loading or spinning up a new class per call site.
By implementing a shared secret loadLibrary that wraps in a privileged action if necessary, we avoid loading a handful of one-off classes which will never be unloaded.
By implementing a shared secret loadLibrary that wraps in a privileged action if necessary, we avoid loading a handful of one-off classes which will never be unloaded.
- relates to
-
JDK-8228336 Refactor native library loading implementation
-
- Resolved
-