CentOS 7 - 安装Eclipse

一,以Root身份登入CentOS 7:比较简单是使用Root身份进行操作,下面是如何 。

 https://www.cnblogs.com/sunylat/p/11236845.html

二,安装Eclipse。

Prerequisites

Open a terminal (Applications >> System Tools >> Terminal) and then switch to root user.

$ su -

Install Java

Before installing Eclipse, make sure you have installed JDK on your machine. You can either install Oracle JDK or OpenJDK. 

For this post, I will use OpenJDK 8 here.

yum -y install java-1.8.0-openjdk

Verify the Java version on your machine.

java -version

Output:

openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

Install Eclipse

Download latest eclipse package (v2019-03) over from the official page using a web browser.

OR

Download the Eclipse package over a terminal using the following command (risk of being changed).

wget http://ftp.jaist.ac.jp/pub/eclipse/technology/epp/downloads/release/2019-03/R/eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz

Extract the Eclipse package to your desired directory (/opt).

tar -zxvf eclipse-java-2019-03-R-linux-gtk-x86_64.tar.gz -C /opt

Symlink the Eclipse executable to /usr/bin path so all users in your system can use Eclipse IDE.

ln -sf /opt/eclipse/eclipse /usr/bin/eclipse

Setup Eclipse Menu Entry

Create a Gnome launcher.

vi /usr/share/applications/eclipseide.desktop

Place the following content in the above file.

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse IDE
Comment=Eclipse IDE
Exec=/usr/bin/eclipse
Icon=/opt/eclipse/icon.xpm
Categories=Application;Development
Version=1.0
Type=Application
Terminal=0

注意问题:Desktop Entry,必须是这些文字,区分大小写,如果不是这个名字,可能不会在菜单里面出现,我就因为这个Desktop写成了desktop,结果图标没能出现在菜单里。

 

Start Eclipse

Command line

eclipse

Graphical Mode

Go to Application >> Programming >> Eclipse.

 

 参考:

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-eclipse-4-4-luna-ide-on-centos-7-rhel-7.html

 

posted on 2019-07-24 13:54  sunylat  阅读(876)  评论(0编辑  收藏  举报