Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7155538

UIManager.setLookAndFeel throws Exceptions on uel6 for Nimbus and GTK LAFs

XMLWordPrintable

    • generic
    • linux_oracle_6.0

      The issue appears when 32-bit jdk bundles are used on 64-bit machine.
      When you try to set Nimbus LAF, you get NPE, and when you try to set GTK LAF, you get UnsupportedLookAndFeelException, though this LAF was in the list obtained by UIManager.getInstalledLookAndFeels()

      Part of the log:

      Look and Feel to be set:
       javax.swing.plaf.nimbus.NimbusLookAndFeel
      java.lang.NullPointerException
      at sun.font.FontConfigManager.getFontConfigFont(FontConfigManager.java:352)
      at sun.awt.X11FontManager.getFontConfigFUIR(X11FontManager.java:817)
      at sun.font.FontUtilities.getFontConfigFUIR(FontUtilities.java:488)
      at javax.swing.plaf.nimbus.NimbusDefaults.<init>(NimbusDefaults.java:138)
      at javax.swing.plaf.nimbus.NimbusLookAndFeel.<init>(NimbusLookAndFeel.java:100)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
      at java.lang.Class.newInstance0(Class.java:372)
      at java.lang.Class.newInstance(Class.java:325)
      at javax.swing.UIManager.setLookAndFeel(UIManager.java:579)
      at bug4492274.doTest(bug4492274.java:143)
      at bug4492274.runTest(bug4492274.java:93)
      at bug4492274.main(bug4492274.java:53)

      ----------------------
      Look and Feel to be set:
       com.sun.java.swing.plaf.gtk.GTKLookAndFeel
      javax.swing.UnsupportedLookAndFeelException: [GTK look and feel - com.sun.java.swing.plaf.gtk.GTKLookAndFeel] not supported on this platform
      at javax.swing.UIManager.setLookAndFeel(UIManager.java:522)
      at javax.swing.UIManager.setLookAndFeel(UIManager.java:579)
      at bug4492274.doTest(bug4492274.java:143)
      at bug4492274.runTest(bug4492274.java:93)
      at bug4492274.main(bug4492274.java:53)

            Unassigned Unassigned
            vabetkin Vitalii Abetkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: