dev@glassfish.java.net

NPE from glassfish installer

From: Cheng Fang <Cheng.Fang_at_Sun.COM>
Date: Mon, 08 Oct 2007 18:42:19 -0400

A user reported this problem on glassfish Chinese forum here:
http://gceclub.sun.com.cn/NASApp/sme/jive/thread.jsp?forum=22&thread=46763

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initSystemColorDefaults(GTKLookAndFeel.java:1267)
(see above URL for full stacktrace)

The user was trying to install glassfish on Debian with JDK 6, running
java -jar glassfishv2.jar

It appears that glassfish's poorman's installer incorrectly sets the laf
on the main thread, whereas it should be set on the EDT (event
dispatching thread). A google search also shows a related JDK 6 bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6585553 (NPE in
GTKLookAndFeel.initSystemColorDefaults() on mustang when remote X11
displaying.).

While we can't count on the JDK bug to be fixed in JDK 6, can we fix our
installer main class to correctly set laf?

Thanks,
-cheng