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

Deprecate GTK2 for removal

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 21
    • client-libs
    • None
    • behavioral
    • minimal
    • There is very little risk in just changing from deprecated to deprecated for removal.
    • Other
    • Implementation

      Summary

      Deprecate for removal the JDK code that supports using the GTK2 Linux desktop platform library.

      Problem

      JDK has internal code that interoperates with the GTK2 platform library, primarily to support the Swing GTK LookAndFeel running in GTK2 mode.

      GTK3 has been the default version of GTK on Linux for several years now and the Swing GTK LookAndFeel defaults to that.

      The GTK2 support is now only available by specifying it with the jdk.gtk.version system property and since many current distros make GTK2 an optional install, it also requires that to be done to work.

      And with the announcement of the GTK 4 release in December 2020, the GTK 2 toolkit is reaching its end of life.

      Solution

      Since almost all versions of Linux supported by JDK provide GTK3, it is time to deprecate for removal the GTK2 support in JDK. It is expected to be removed some time after no JDK supported platform needs it (ie after OL6 extended support ends in June 2024).

      Since there is no associated API, just print a deprecation message once when trying to load gtk2.

      Add a release note about this deprecation for removal.

      Specification

      Print the following message once when trying to load gtk2 :

      WARNING: the GTK 2 library is deprecated and its support will be removed in a future release.

            azvegint Alexander Zvegintsev
            prr Philip Race
            Kevin Rushforth, Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: