1. Find the file directory where eclipse is decompressed, and open it in the terminal
2. Switch the user to root in the terminal
su
3. Create a file in this directory
touch eclipse.desktop
4. Open this file with vim and add the following content
vim eclipse.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/usr/local/eclipse/eclipse
Icon=/usr/local/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
Name is the name of the created shortcut, and Icon is the icon of the shortcut. Be sure to note that the path of Exec and Icon is the path where your file is located.
5. After saving and exiting, enter this command:
chmod +x eclipse.desktop
6. Finally, copy and paste the file in the folder to the desktop