Ubuntu 17.10 not showing Spring Tool Suite icon in the Dock

It seems STS is not a correct StartupWMClass value in the STS.desktop file.

To get a correct value first switch to an Xorg session and launch Spring Tool Suite. Then open Terminal and run xprop WM_CLASS, place the cursor over the STS window and click. You should get correct values for Spring Tool Suite in the Terminal window as

WM_CLASS(STRING) = "value1", "value2"

You should get something like the following in particular

WM_CLASS(STRING) = "Spring Tool Suite", "Spring Tool Suite"

Then change the StartupWMClass=STS line to StartupWMClass=Spring Tool Suite in the STS.desktop file and save it.


In March 2022, latest STS download Spring Tool Suite 4 Version: 4.14.0.RELEASE

i had to change :

Exec=/PATH_TO_MY_EXTRACT_DIRECTORY/sts-bundle/sts-3.9.1.RELEASE/STS

To:

 Exec=/PATH_TO_MY_EXTRACT_DIRECTORY/sts-4.14.0.RELEASE/SpringToolSuite4 

The executable is called "SpringToolSuite4" now

StartupWMClass=STS

works as well as

StartupWMClass=Spring Tool Suite

Fyi lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.10
Release:    21.10
Codename:   impish

And STS version:

Spring Tool Suite 4 
Version: 4.14.0.RELEASE
Build Id: 202203131612
OS: Linux, v.5.13.0-37-generic, x86_64 / gtk 3.24.30
Java vendor: Eclipse Adoptium
Java runtime version: 17.0.2+8
Java version: 17.0.2