src/java.rmi/share/classes/sun/rmi/transport/GC.java

Print this page
rev 13995 : 8153286: Move sun.misc.GC to java.rmi ( sun.rmi.transport )
Reviewed-by: alanb, erikj

@@ -21,11 +21,11 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
 
-package sun.misc;
+package sun.rmi.transport;
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
 import java.util.SortedSet;
 import java.util.TreeSet;

@@ -36,11 +36,11 @@
  *
  * @author   Mark Reinhold
  * @since    1.2
  */
 
-public class GC {
+class GC {
 
     private GC() { }            /* To prevent instantiation */
 
 
     /* Latency-target value indicating that there's no active target

@@ -80,10 +80,18 @@
      * is no longer strongly reachable may have to be inspected multiple times
      * before it can be reclaimed.
      */
     public static native long maxObjectInspectionAge();
 
+    static {
+        AccessController.doPrivileged(new PrivilegedAction<Void>() {
+            public Void run() {
+                System.loadLibrary("rmi");
+                return null;
+            }});
+    }
+
     private static class Daemon extends Thread {
 
         public void run() {
             for (;;) {
                 long l;