src/solaris/classes/java/util/prefs/FileSystemPreferences.java

Print this page

        

@@ -46,10 +46,19 @@
  * @author  Josh Bloch
  * @see     Preferences
  * @since   1.4
  */
 class FileSystemPreferences extends AbstractPreferences {
+
+    static {
+        PrivilegedAction<Void> load = () -> {
+            System.loadLibrary("prefs");
+            return null;
+        };
+        AccessController.doPrivileged(load);
+    }
+
     /**
      * Sync interval in seconds.
      */
     private static final int SYNC_INTERVAL = Math.max(1,
         Integer.parseInt(