src/share/classes/sun/nio/ch/Util.java

Print this page




 455             if (!sun.misc.VM.isBooted())
 456                 return false;
 457             String value = AccessController.doPrivileged(
 458                 new GetPropertyAction("sun.nio.ch.bugLevel"));
 459             bugLevel = (value != null) ? value : "";
 460         }
 461         return bugLevel.equals(bl);
 462     }
 463 
 464 
 465 
 466     // -- Initialization --
 467 
 468     private static boolean loaded = false;
 469 
 470     public static void load() {
 471         synchronized (Util.class) {
 472             if (loaded)
 473                 return;
 474             loaded = true;
 475             java.security.AccessController
 476                 .doPrivileged(new sun.security.action.LoadLibraryAction("net"));
 477             java.security.AccessController
 478                 .doPrivileged(new sun.security.action.LoadLibraryAction("nio"));





 479             // IOUtil must be initialized; Its native methods are called from
 480             // other places in native nio code so they must be set up.
 481             IOUtil.initIDs();
 482         }
 483     }
 484 
 485 }


 455             if (!sun.misc.VM.isBooted())
 456                 return false;
 457             String value = AccessController.doPrivileged(
 458                 new GetPropertyAction("sun.nio.ch.bugLevel"));
 459             bugLevel = (value != null) ? value : "";
 460         }
 461         return bugLevel.equals(bl);
 462     }
 463 
 464 
 465 
 466     // -- Initialization --
 467 
 468     private static boolean loaded = false;
 469 
 470     public static void load() {
 471         synchronized (Util.class) {
 472             if (loaded)
 473                 return;
 474             loaded = true;
 475             java.security.AccessController.doPrivileged(
 476                 new java.security.PrivilegedAction<Void>() {
 477                     public Void run() {
 478                         System.loadLibrary("net");
 479                         System.loadLibrary("nio");
 480                         return null;
 481                     }
 482                 });
 483 
 484             // IOUtil must be initialized; Its native methods are called from
 485             // other places in native nio code so they must be set up.
 486             IOUtil.initIDs();
 487         }
 488     }
 489 
 490 }