src/share/classes/java/awt/GraphicsEnvironment.java

Print this page

        

@@ -108,11 +108,11 @@
             }
             ge = (GraphicsEnvironment) geCls.newInstance();
 //          long t1 = System.currentTimeMillis();
 //          System.out.println("GE creation took " + (t1-t0)+ "ms.");
             if (isHeadless()) {
-                localEnv = new HeadlessGraphicsEnvironment(localEnv);
+                ge = new HeadlessGraphicsEnvironment(ge);
             }
         } catch (ClassNotFoundException e) {
             throw new Error("Could not find class: "+nm);
         } catch (InstantiationException e) {
             throw new Error("Could not instantiate Graphics Environment: "