1. Create a shortcut
1. Download eclipse, the developer recommends downloading the eclipse jee version, so as not to be overwhelmed by various plug-ins;
attach the link: https://www.eclipse.org/downloads/
2. Create a shortcut
cd /usr/share/applications
sudo gedit eclipse.desktop
3. Enter the following in eclipse.desktop:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/lcf/Downloads/eclipse/eclipse
Icon=/home/lcf/Downloads/eclipse/icon.xpm
Terminal=false
StartupNotify=true
Type=Application
Categories=Application;Development;
4. The meaning of each parameter:
Terminal=false :(是否在终端中运行(可选),当Type为Application,此项有效. )
Categories=Application (注明在菜单栏中显示的类别)
Name:快捷方式名称
Exec:代表eclipse执行文件的路径
Icon:代表桌面图标的文件的路径
Type=Application(desktop的类型(必选),常见值有“Application”和“Link”.)
Comment(程序描述(可选))
7. Go to /usr/share/applications one by one and copy eclipse.desktop to the desktop
2. Solve the problem of sometimes creating a shortcut, double-click the shortcut, and report an error that jdk cannot be found
Ubuntu operating system. Create a new jre directory in the eclipse directory, and connect the jre/bin directory under jdk to this directory.
mkdir jre
cd jre
ln -s your JDK directory/bin
The test method is effective.