Alen Mujezinovic
08/01/2019, 11:33 AMUnsupportedOperation exception:
Exception in thread "main" java.lang.UnsupportedOperationException: Internal Error
at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:158)
The offending code checks what library to load:
int libraryToLoad = _queryLibrary(gtkVersion, gtkVersionVerbose);
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
if (libraryToLoad == QUERY_NO_DISPLAY) {
throw new UnsupportedOperationException("Unable to open DISPLAY");
} else if (libraryToLoad == QUERY_USE_CURRENT) {
if (gtkVersionVerbose) {
System.out.println("Glass GTK library to load is already loaded");
}
} else if (libraryToLoad == QUERY_LOAD_GTK2) {
if (gtkVersionVerbose) {
System.out.println("Glass GTK library to load is glassgtk2");
}
NativeLibLoader.loadLibrary("glassgtk2");
} else if (libraryToLoad == QUERY_LOAD_GTK3) {
if (gtkVersionVerbose) {
System.out.println("Glass GTK library to load is glassgtk3");
}
NativeLibLoader.loadLibrary("glassgtk3");
} else {
throw new UnsupportedOperationException("Internal Error");
}
return null;
});
I've got libgtk-2, libgtk-2-dev, libgtk-3 and libgtk-3-dev installed and I'm running on Oracle JDK 8.
$ java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) Server VM (build 25.221-b11, mixed mode)
_queryLibrary is unfortunately a native method.
Any pointers to why this is failing would be massively helpful