8215364: JavaFX crashes on Ubuntu 18.04 with Wayland while using Swing-FX interop
Set the gtk backend to x11 on all systems
Reviewed-by: prr, kcr
diff --git a/jdk/src/solaris/native/sun/xawt/XToolkit.c b/jdk/src/solaris/native/sun/xawt/XToolkit.c
index 58ef49f..2425bf4 100644
--- a/jdk/src/solaris/native/sun/xawt/XToolkit.c
+++ b/jdk/src/solaris/native/sun/xawt/XToolkit.c
@@ -154,6 +154,10 @@
JNI_OnLoad(JavaVM *vm, void *reserved)
{
jvm = vm;
+
+ //Set the gtk backend to x11 on all the systems
+ putenv("GDK_BACKEND=x11");
+
return JNI_VERSION_1_2;
}