Hi, I want to change the java class name displayed on Linux desktop (Gnome) panel to show Application name instead.
I have tried many ways but still not succeed.
->
Dim Application As JavaObject = Me.As(JavaObject).InitializeStatic("com.sun.glass.ui.Application")
Application.RunMethodJO("GetApplication", Null).RunMethod("setName", Array(ApplicationName))
Dim stage As JavaObject = MainForm.As(JavaObject).GetFieldJO("stage")
stage.RunMethod("setTitle", Array(ApplicationName)) ' Set the window title
ChatGPT and DeepSeek giving the answer to use
WM_CLASS and
WM_NAME but I am not sure what is the correct way.
I also tried adding
StartupWMClass into myapp.desktop file.
[Desktop Entry]
Name=MyApp
Type=Application
Categories=Utility;
Exec=/opt/myapp/run.command
Icon=/usr/share/icons/myapp/icon.png
StartupWMClass=com.company.myapp.main
There is another answer of using jna and x11 helper. I don't understand either.
Please help.