JDK-6691767 : Swing applications don't work on second display on OpenSolaris
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6u4
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_nevada
  • CPU: x86
  • Submitted: 2008-04-22
  • Updated: 2010-04-02
  • Resolved: 2008-04-23
Related Reports
Duplicate :  
Description
When trying to run a Swing application on the second display on my OpenSolaris RC1
Ultra 20 system, it displays the splash screen and then dies with:

$ DISPLAY=:0.1 java -jar SwingSet2.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:169)
        at java.awt.Toolkit$2.run(Toolkit.java:836)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:828)
        at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:120)
        at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556)
        at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130)
        at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:537)
        at javax.swing.UIManager.setLookAndFeel(UIManager.java:577)
        at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1331)
        at javax.swing.UIManager.initialize(UIManager.java:1418)
        at javax.swing.UIManager.maybeInitialize(UIManager.java:1406)
        at javax.swing.UIManager.getDefaults(UIManager.java:656)
        at javax.swing.UIManager.put(UIManager.java:985)
        at SwingSet2.main(SwingSet2.java:229)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at sun.awt.X11GraphicsEnvironment.getDefaultScreenDevice(X11GraphicsEnvironment.java:218)
        at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:91)
        ... 17 more


I'm running the version of the JDK that comes with OpenSolaris: 1.6.0_04-b12.
I also tried 1.6.0_06-b2 and it fails in the same way.