changeset 1294:70903e2c39e3

6850398: Allow GraphicsEnvironment to be loaded by system classloader (edit) Reviewed-by: campbell, prr
author jgodinez
date Mon, 22 Jun 2009 09:47:50 -0700
parents 956715ded919
children fafa991c27ac
files src/share/classes/java/awt/GraphicsEnvironment.java
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/GraphicsEnvironment.java	Mon Jun 15 09:59:03 2009 -0700
+++ b/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()) {