0

A java application I have written should be started by a .desktop file, so that I can have it in the ubuntu-dash.

It only works when the .desktop-file name matches the full-qualified name of my starter class is: the name should exactly be org-mypackage-MyMainClass.desktop.

Is the name p.ex. only MainClass.desktop, the application starts, but the icon in the ubuntu-dash is not displayed and it isn't possible to stick it on the dash.

Why, and how can I avoid it?

1 Answers1

0

I found the solution under https://stackoverflow.com/a/69404254: set a field StartupWmClass with the full-qualified java-class name (but dashes replacing dots) in the .desktop-file:

Name=My application name
StartupWMClass=org-mypackage-MyMainClass

Thanks this entry, the .desktop-File itself can have any name: the application is always known as "My application name".