jdk/src/java.desktop/share/classes/java/awt/GraphicsEnvironment.java
changeset 26749 b6598aa90114
parent 25859 3317bb8137f4
child 27056 edb2e3793346
equal deleted inserted replaced
26748:fba66a2e8961 26749:b6598aa90114
    95         String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
    95         String nm = AccessController.doPrivileged(new GetPropertyAction("java.awt.graphicsenv", null));
    96         try {
    96         try {
    97 //          long t0 = System.currentTimeMillis();
    97 //          long t0 = System.currentTimeMillis();
    98             Class<?> geCls;
    98             Class<?> geCls;
    99             try {
    99             try {
   100                 // First we try if the bootclassloader finds the requested
   100                 // First we try if the bootstrap class loader finds the
   101                 // class. This way we can avoid to run in a privileged block.
   101                 // requested class. This way we can avoid to run in a privileged
       
   102                 // block.
   102                 geCls = Class.forName(nm);
   103                 geCls = Class.forName(nm);
   103             } catch (ClassNotFoundException ex) {
   104             } catch (ClassNotFoundException ex) {
   104                 // If the bootclassloader fails, we try again with the
   105                 // If the bootstrap class loader fails, we try again with the
   105                 // application classloader.
   106                 // application class loader.
   106                 ClassLoader cl = ClassLoader.getSystemClassLoader();
   107                 ClassLoader cl = ClassLoader.getSystemClassLoader();
   107                 geCls = Class.forName(nm, true, cl);
   108                 geCls = Class.forName(nm, true, cl);
   108             }
   109             }
   109             ge = (GraphicsEnvironment)geCls.newInstance();
   110             ge = (GraphicsEnvironment)geCls.newInstance();
   110 //          long t1 = System.currentTimeMillis();
   111 //          long t1 = System.currentTimeMillis();