Ubuntu 15下安装Eclipse经验分享

一、下载软件

Eclipse官网: http://www.eclipse.org/downloads/

Ubuntu 15下安装Eclipse经验分享

Ubuntu 15下安装Eclipse经验分享

Ubuntu 15下安装Eclipse经验分享

上面是windwos版本的,因为我是在本地电脑操作的,如果用ubuntu浏览器进入的话就会默认显示linux版本。如果想下以前的老版本的话右边有相应的版本可下载

Ubuntu 15下安装Eclipse经验分享

或者上这下: http://archive.eclipse.org/eclipse/downloads/

Ubuntu 15下安装Eclipse经验分享

这下的是Neon版本,大概有220M多

Ubuntu 15下安装Eclipse经验分享

下载之后

Ubuntu 15下安装Eclipse经验分享

二、安装

解包到指定目录

Ubuntu 15下安装Eclipse经验分享

解压之后大概有这么些文件

Ubuntu 15下安装Eclipse经验分享

三、运行eclipse

1.为Eclipse创建配置文件

在超级终端执行:     

cd /usr/share/applications

sudo touch eclipse.desktop 

//xx.desktop这里的xx可以是任意合法的名称,但是文件名后缀必须是.desktop

Ubuntu 15下安装Eclipse经验分享

2.进行配置

在超级终端执行:

sudo gedit eclipse.desktop

然后在文件里面输入下面的内容:

[Desktop Entry] 
Type=Application 
Name=Eclipse 
Comment=Eclipse Integrated Development Environment 
Icon=/home/fendo/下载/eclipse/icon.xpm 
Exec=/home/fendo/下载/eclipse/eclipse 
Terminal=false 
Categories=Development;IDE;Java; 


Ubuntu 15下安装Eclipse经验分享

其中/home/fendo/下载/eclipse/是eclipse的安装路径。保存,关闭文件。然后

3.点击ubuntu左上角的圆形图标(Dash主页),输入刚刚为eclipse起的名称

Ubuntu 15下安装Eclipse经验分享

点击执行,报错

A java Runtime Environment(JRE) or java Development ket(JDK) must be available in order to run eclipse no java virtual machine was found after searching the following locations

Ubuntu 15下安装Eclipse经验分享

解决方法:

sudo mkdir jre
cd jre
sudo ln -s 你的JDK目录/bin



Ubuntu 15下安装Eclipse经验分享

再点击eclipse,Eclipse被打开

Ubuntu 15下安装Eclipse经验分享

同时Eclipse的图标也出现在了桌面左侧的启动栏上。鼠标右键单击Eclipse图标,在弹出的菜单里面选择“锁定到启动器”,这样就可以锁定了。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。