Reprinted from: http://www.linuxidc.com/Linux/2017-02/140909.htm
System: Ubuntu 16.04
JDK version: 1.8.0_121
1. Download Eclipse on official website, my version is eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz, as long as the JDK version is high, other versions can also
2. Move and unzip to the/java directory
sudo mv Eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz/java//move to/java
Cd/java//Enter/java directory
TAR-ZXVF eclipse-jee-neon-2-linux-gtk-x86_64.tar.gz//Decompression
3. Run the command in the/java/eclipse directory
./eclipse
You can open the instructions correctly if the installation is complete and the JDK is not configured correctly
However, it is cumbersome to run this command every time, but Eclipse does not have a launcher icon, so we do a
The menu icon for 1.UBuntu is saved in the/usr/share/applications directory, so a eclipse.desktop file is created in this directory first
sudo gedit/usr/share/applications/eclipse.desktop
2. Enter the following in the file
[Desktop Entry]
Encoding=utf-8
Name=eclipse platfrom//Icon name, can be changed
Comment=eclipse IDE
Exec=/java/eclipse/eclipse the path of eclipse under the//eclipse folder
ICON=/JAVA/ECLIPSE/ICON.XPM//eclipse folder label icon.xpm path
Terminal=false
Startupnotify=true
Type=application
Categories=application;development;
3. The right to assign the document
chmod u+x/usr/share/applications/eclipse.desktop
4. Find out more eclipse icons, double-click to run, copy to the desktop can
Note: If JDK,JRE is not found, the environment variable is not configured correctly
Ubuntu 16.04 install Eclipse and create desktop shortcuts