1. 先下载 eclipse
2.解压eclipse-SDK 到 安装目录 /usr/local/
2.解压eclipse-SDK 到 安装目录 /usr/local/
tar -zxvf eclipse /usr/local/
//设置eclipse目录权限为当前用户
sudo chown -R husw:husw eclipse
//如果你要用root启动的话,设置如下
sudo chown -R root:root eclipse
//命令行启动 解压完成即可启动的
sudo /usr/local/eclipse/eclipse
3. 创建Ubuntu的eclipse菜单(可选)
sudo gedit /usr/share/applications/eclipse.desktop
添加如下内容:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Eclipse
Exec=eclipse
TryExec=eclipse
Comment=Eclipse,EclipseSDK
Exec=/usr/local/eclipse/eclipse
Icon=/usr/local/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=Application;Development;
此时你已经可以在/usr/share/applications/中看到Eclipse图标
4. 创建启动器
sudo gedit /usr/bin/eclipse
添加如下内容
#!/bin/sh
export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/usr/local/eclipse"
$ECLIPSE_HOME/eclipse $*
添加可执行权限
sudo chmod +x /usr/bin/eclipse
转载自: http://www.linuxidc.com/Linux/2011-11/46469.htm