6850398: Allow GraphicsEnvironment to be loaded by system classloader (edit)
Reviewed-by: campbell, prr
--- 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()) {