首先输入指令: cd /usr/share/applications
然后输入指令: sudo vim eclipse.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse
Exec=/usr/local/eclipse/eclipse
Icon=/usr/local/eclipse/icon.xpm
StartupNotify=true
Type=Application
Categories=Application;Development;
在/opt/eclipse/文件夹中创建一个指向JRE路径的软链接。
root@jingshan-virtual-machine:/usr/local/eclipse# ln -sf ${JRE_HOME} jre
解决问题