1. Check if java is installed
java -version</p> <p> java version "1.7.0_51"
OpenJDK Runtime Environment (rhel-2.4.5.5.el7-x86_64 u51-b31)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)
2. Download the jdk version
2.1http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
2.2 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3. Unzip to /opt directory
ar -zxvf eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz -C /opt
Where -C switches the target address to /opt, the target address can be freely changed, but it is recommended to be /opt
4.
The above installation has been completed, the following configuration enables the software to be opened using eclipse in the shell environment
4.1 Modify /opt/eclipse permissions
#chmod -R +r /opt/eclipse
4.2 Create an eclipse file under /usr/bin and modify permissions
#touch /usr/bin/eclipse
#chmod 755 /usr/bin/eclipse
4.3 Adding scripts launched from the shell
#vi / usr / bin / eclipse
Insert the following lines and save and exit:
#!/bin/sh
export ECLIPSE_HOME="/opt/eclipse"
$ECLIPSE_HOME/eclipse $*
4.4 At this point, enter the eclipse command in the terminal to start eclipse
5 Add desktop shortcuts
On the blank space of the desktop, click the right mouse button, a dialog box will pop up, select "Create Launcher" ("New Launcher" in Chinese), and select Application ("New Launcher" in Chinese) in the "Create Launcher" ("Create Shortcut" in Chinese) dialog box Application"), enter the name: eclipse, find the eclipse startup program in Command (Chinese "command") (for example, mine is: /opt/eclipse/eclipse), double-click the icon on the upper left and a dialog box for selecting an icon will pop up , find the directory where eclipse is installed, find icon.xpm in the directory, select Open (OK), after setting it is similar to the following figure:
6. So far, there are three ways to open eclipse, namely 1) desktop shortcut; 2) command line terminal; 3) resource manager (double-click the eclipse icon in the /opt/eclipse directory)
----------------------------Dividing line-------------------- ------------------------------
4 - Make a symlink to the directory
5 – Create a Gnome Launcher
Add the following code:
Encoding=UTF-8
Name=Eclipse 4.4.1
Comment=Eclipse Luna
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0