RFR: 8273089: Deprecate JavaFX GTK 2 library for removal

Johan Vos jvos at openjdk.java.net
Sat Dec 11 09:14:12 UTC 2021


On Tue, 30 Nov 2021 13:26:30 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

> This PR deprecates the JavaFX glass GTK 2 library for removal. Since there isn't an associated API, the mechanism for doing this is to print a "deprecated for removal" warning message when the `glassgtk2` library it is loaded. A message is printed regardless of why the GTK 2 library was loaded, which can happen for one of the following reasons:
> 
> 1. The application or end user has explicitly requested GTK 2 using the `jdk.gtk.version` system property.
> 2. Another native library has already loaded the GTK 2 library (an application cannot load both the GTK 2 and GTK 3 libraries in the same process)
> 3. As a fallback if the gtk3 libraries are not available on the system.
> 
> The warning messages are patterned after the security manager deprecation messages added as part of [JEP 411](https://openjdk.java.net/jeps/411).
> 
> I added two system tests, one that sets the `jdk.gtk.version` system property to `2` and verifies that the warning message is printed, and one that doesn't set `jdk.gtk.version` and verifies that no warning message is printed.

works as intended.

-------------

Marked as reviewed by jvos (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/685


More information about the openjfx-dev mailing list