Install eclipse under Centos7

Download the Eclipse tarball

Download pathhttp://mirrors.neusoft.edu.cn/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

(Generally, after the file is downloaded, it will be saved in the /home/[username]/download directory)

 

2. Enter the command line interface to check whether Java has been installed normally. (Generally, CentOS 7 is installed with OpenJDK by default)

[root@localhose] #java -version

If a message similar to the following appears, Java has been installed normally, and you can skip step 3.

openjdk version "1.8.0_151"

OpenJDK Runtime Environment (build 1.8.0_151 - b12)

OpenJDK 64-Bit Server VM (build 25.151 - b12, mixed mode)

 

3. Install Java

[root@localhose] #yum install java

 

4. Unzip the Eclipse archive to the opt directory

[root@localhose download] #tar -zxvf eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz -C /opt

 

5. Link the eclipse executable file to the user directory
[root@localhose download] #ln -s /opt/eclipse/eclipse /usr/bin/eclipse


6. Create a startup item
[root@localhose download] #vi /usr/share /applications/eclipse.desktop


添加如下代码:
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse 4.4.2
Comment=Eclipse Luna
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Version=1.0
Type=Application
Terminal=0

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325303271&siteId=291194637