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

UIManager.getSytemLookAndFeelClassName() returns wrong value on Fedora 32

    XMLWordPrintable

Details

    • b12
    • linux

    Backports

      Description

        Java relies on an environment variable GNOME_DESKTOP_SESSION_ID for getting GTK desktop theme. This environmental variable was deprecated earlier and now this got removed in the latest version via: https://gitlab.gnome.org/GNOME/gnome-session/commit/00e0e6226371d53f651cc881e74c0543192c94a8#5b3005b925ed5c2612a9604ad3c756b1f9472165So,

        with the removal of this GNOME_DESKTOP_SESSION_ID variable, how should Java, moving forward detect a Gtk-based desktop?

        For Example:
        System.out.println(UIManager.getSystemLookAndFeelClassName());
        - On Fedora 32, it returns: (ACTUAL): javax.swing.plaf.metal.MetalLookAndFeel
        - On Fedora 27, it returns: (EXPECTED): com.sun.java.swing.plaf.gtk.GTKLookAndFeel

        This issue is discussed in details here: https://github.com/AdoptOpenJDK/openjdk-support/issues/94

        Note: As per the latest updates received from GNOME, using the above environmental variable is a bug. And the recommendation is that Java GUI apps running on Linux (and probably all Unix platforms) should use whichever "look and feel" is considered to be high-quality and doesn't look hugely out-of-place.

        Attachments

          Issue Links

            Activity

              People

                pbansal Pankaj Bansal (Inactive)
                vtewari Vyom Tewari
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: