下载eclipse并解压到/opt目录下
即eclipse启动文件在/opt/eclipse/目录下
cd /usr/share/applications/
sudo touch eclipse.desktop
sudo vim eclipse.desktop
[Desktop Entry]
Type=Application
Version=2020-03-R
Name=Eclipse
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
MimeType=Development;Languages;Java;
保存即可