Spring Tool Suite(STS) desktop entry for ubuntu

  • Open terminal
  • Type gedit and press enter
  • Paste the below code in gedit

    [Desktop Entry]
    Type=Application
    Name=sts
    Comment=Spring Tool Suite
    Icon=/home/user/sts-bundle/sts-3.8.2.RELEASE/icon.xpm
    Exec=/home/user/sts-bundle/sts-3.8.2.RELEASE/STS
    Terminal=false
    Categories=Development;IDE;Java;
    StartupWMClass=STS
    
  • Change the path in above code to your path

  • Save the file with .desktop extension
  • Right click the file >properties>permissions
  • Tick Allow executing file as program

For Spring Tool Suite 4 you can use the following. StartupWMClass is important if you want the new window to open on the same dock icon (if you don't set StartupWMClass, it will add a new icon at the end of the dock for the new open window).

[Desktop Entry]
Name=Spring Tool Suite 4
Comment=Spring Tool Suite 4
Exec=/sts_folder_path/SpringToolSuite4
Icon=/sts_folder_path/icon.xpm
Terminal=false
Type=Application
Categories=Development;IDE;Java;
StartupWMClass=Spring Tool Suite 4

Tested using Ubuntu 19.10.


On debian 9 you have to place the .desktop file at /usr/share/applications directory and run sudo update-desktop-database. You can refer to stack exchange

Tags:

Ide