Centos7下面安装eclipse

下载Eclipse压缩包

下载路径 http://mirrors.neusoft.edu.cn/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz

(一般文件下载完成后会保存在 /home/[username]/download目录下)

2、进入命令行界面,查看Java是否已正常安装。(一般CentOS 7默认是装好OpenJDK的)

[root@localhose] #java -version

如果出现类似如下信息,则说明Java已正常安装,可跳过步骤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、安装Java

[root@localhose] #yum install java

4、将Eclipse压缩包解压至opt目录下

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

5、将eclipse执行文件链接到用户目录
[root@localhosedownload]#ln -s /opt/eclipse/eclipse /usr/bin/eclipse


6、 创建一个启动项
[root@localhosedownload]#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

相关推荐