jdk/src/share/classes/java/awt/GraphicsEnvironment.java
changeset 3016 2b51287517f1
parent 2372 229b2c88d29c
child 3925 945d08ef1c7b
--- a/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Mon Jun 15 09:59:03 2009 -0700
+++ b/jdk/src/share/classes/java/awt/GraphicsEnvironment.java	Mon Jun 22 09:47:50 2009 -0700
@@ -79,8 +79,9 @@
 
             try {
 //                      long t0 = System.currentTimeMillis();
-                localEnv =
-                    (GraphicsEnvironment) Class.forName(nm).newInstance();
+                ClassLoader cl = ClassLoader.getSystemClassLoader();
+                Class geCls = Class.forName(nm, true, cl);
+                localEnv = (GraphicsEnvironment)geCls.newInstance();
 //              long t1 = System.currentTimeMillis();
 //              System.out.println("GE creation took " + (t1-t0)+ "ms.");
                 if (isHeadless()) {