[b]一、下载软件[/b]
Eclipse官网: [url=http://www.eclipse.org/downloads/]http://www.eclipse.org/downloads/[/url]
[img]http://files.jb51.net/file_images/article/201612/2016122616494514.png[/img]
[img]http://files.jb51.net/file_images/article/201612/2016122616494515.png[/img]
[img]http://files.jb51.net/file_images/article/201612/2016122616494516.png[/img]
上面是windwos版本的,因为我是在本地电脑操作的,如果用ubuntu浏览器进入的话就会默认显示linux版本。如果想下以前的老版本的话右边有相应的版本可下载
[img]http://files.jb51.net/file_images/article/201612/2016122616494517.png[/img]
或者上这下: http://archive.eclipse.org/eclipse/downloads/
[img]http://files.jb51.net/file_images/article/201612/2016122616494518.png[/img]
这下的是Neon版本,大概有220M多
[img]http://files.jb51.net/file_images/article/201612/2016122616494519.png[/img]
下载之后
[img]http://files.jb51.net/file_images/article/201612/2016122616494520.png[/img]
[b]二、安装[/b]
解包到指定目录
[img]http://files.jb51.net/file_images/article/201612/2016122616494521.png[/img]
解压之后大概有这么些文件
[img]http://files.jb51.net/file_images/article/201612/2016122616494522.png[/img]
[b]三、运行eclipse[/b]
[b]1.为Eclipse创建配置文件[/b]
在超级终端执行:
cd /usr/share/applications
sudo touch eclipse.desktop
//xx.desktop这里的xx可以是任意合法的名称,但是文件名后缀必须是.desktop
[img]http://files.jb51.net/file_images/article/201612/2016122616494523.png[/img]
[b]2.进行配置[/b]
在超级终端执行:
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;
[img]http://files.jb51.net/file_images/article/201612/2016122616494524.png[/img]
其中/home/fendo/下载/eclipse/是eclipse的安装路径。保存,关闭文件。然后
[b]3.点击ubuntu左上角的圆形图标(Dash主页),输入刚刚为eclipse起的名称[/b]
[img]http://files.jb51.net/file_images/article/201612/2016122616494525.png[/img]
点击执行,
[b]报错[/b]:
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
[img]http://files.jb51.net/file_images/article/201612/2016122616494526.png[/img]
解决方法:
sudo mkdir jre
cd jre
sudo ln -s 你的JDK目录/bin
[img]http://files.jb51.net/file_images/article/201612/2016122616494527.png[/img]
再点击eclipse,Eclipse被打开
[img]http://files.jb51.net/file_images/article/201612/20161226165155299.jpg?2016112616524[/img]
同时Eclipse的图标也出现在了桌面左侧的启动栏上。鼠标右键单击Eclipse图标,在弹出的菜单里面选择“锁定到启动器”,这样就可以锁定了。
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程素材网。