ubuntu 10.04/11.04 手动安装 eclipse

Step0: Download eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz

http://www.eclipse.org/downloads/

Step1: Extract eclipse to /opt

$ cd ~/Downloads
$ pwd
/home/grail/Downloads
$ sudo tar -zxvf eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz -C /opt

Step2: Change Own for /opt/eclipse

$ cd /opt
$ pwd
/opt
$ sudo chown -R grail:grail eclipse

Step3: Create an eclipse executable in your path

3.1 Create a empty file which named eclipse

$ sudo touch /usr/bin/eclipse

3.2 Add x mode to file /usr/bin/eclipse to make it executable

$ sudo chmod 755 /usr/bin/eclipse

or

$ sudo chmod +x /usr/bin/eclipse

3.3 Modified the file content

$ sudo vim /usr/bin/eclipse
 

/usr/bin

-rwxr-xr-x 1 root root 133 2010-11-30 19:50 eclipse*

#!/bin/sh
export GDK_NATIVE_WINDOWS=true
export MOZILLA_FIVE_HOME="/usr/lib/mozilla"
ECLIPSE=/opt/eclipse/eclipse
exec $ECLIPSE "$@"

Step4: Create a gnome menu item

$ sudo vim /usr/share/applications/eclipse.desktop
/usr/share/applications

-rw-r--r--   1 root root   195 2010-11-30 19:48 eclipse.desktop

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Icon=/opt/eclipse/icon.xpm
Exec=eclipse
Terminal=false
Type=Application
Categories=Application;Development;IDE;
StartupNotify=true

Step5:Launch Eclipse for the first time

$ /opt/eclipse/eclipse -clean


NOTE:

i.  The Java SDK should be installed before

e.g.

JDK6 (JRE alone is not sufficient)

Installing the sun-java6-jdk

The Sun JDK is no longer in Ubuntu's main package repository.

In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"

$ sudo add-apt-repository "deb http://cz.archive.Ubuntu.com/ubuntu hardy-updates main multiverse"

$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk


ii. The proper version of eclipse should be download

e.g.

eclipse-SDK-3.7.2-linux-gtk.tar.gz---------------for 32bit ubuntu

eclipse-SDK-3.7.2-linux-gtk-x86_64.tar.gz----for 64bt ubuntu

<Then End>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值