What should I do if the program freezes when trying to apply LookAndFeel?

31 Views Asked by At

I downloaded the FXTrayIcon library, but when I try to initialize, my program just freezes. I started debugging and came to the conclusion that the problem was probably due to my graphical shell. Here is my stack trace:

[MyClass] UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
[UIManager:setLookAndFeel():637] setLookAndFeel((LookAndFeel)(lnfClass.newInstance()));
[UIManager:setLookAndFeel():590] newLookAndFeel.initialize();
[GTKLookAndFeel:initialize():1441] loadStyles();
[GTKLookAndFeel:loadStyles():1548] setStyleFactory(getGTKStyleFactory());
[GTKLookAndFeel:getGTKStyleFactory():1562] Object iconSizes = engine.getSetting(GTKEngine.Settings.GTK_ICON_SIZES);
[GTKEngine:getSetting():633] return native_get_gtk_setting(property.ordinal());

I realized that the program freezes precisely when trying to get some parameter using jni. But what to do in this case?

java: open jdk 21

os: Ubuntu 22.04

shell: GNOME 42.9 (GTK 3.24.33) X11

0

There are 0 best solutions below