# HG changeset patch # User jgodinez # Date 1245689270 25200 # Node ID 2b51287517f1181ad3a1d2d3035e38e265675385 # Parent 1f05569195f0f488a1c84d314ed670e60de4abee 6850398: Allow GraphicsEnvironment to be loaded by system classloader (edit) Reviewed-by: campbell, prr diff -r 1f05569195f0 -r 2b51287517f1 jdk/src/share/classes/java/awt/GraphicsEnvironment.java --- 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()) {