ubuntu 下java开发环境安装

先更新源,
sudo gedit /etc/apt/sources.list

 加上cn99的源或者其他源
deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse

福州电信源:
deb http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main multiverse restricted universe
deb-src http://ubuntu.cnsite.org/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cnsite.org/ubuntu-cn/ feisty main multiverse restricted universe

保存,关闭。

安装JDK

打开终端 ,执行下面命令:

sudo apt-get install sun-java6-jdk
设置当前默认的java解释器
sudo update-alternatives --config java

设置环境变量:
sudo gedit /etc/environment
在其中添加如下两行:
CLASSPATH=/usr/lib/jvm/java-6-sun/lib
JAVA_HOME=/usr/lib/jvm/java-6-sun

安装eclipse

下载eclipse3.2 for linux版本
可以从 http://www.eclipse.org/downloads/ 这里下载,也可以直接下载此安装包
下载后将解压此包文件,会得到一个eclipse目录。可以将此目录放到 /opt/ 下面。
进入到eclipse 目录
 cd /opt/eclipse
设置文件eclipse执行权:
chown  - R root:你的用户名 eclipse
  创建桌面连接 
sudo gedit  / usr / share / applications / eclipse.desktop
加入下面内容   
[ Desktop Entry ]
Encoding
= UTF- 8
Name
= Eclipse
Comment
= Eclipse SDK
Exec
= /opt/eclipse/eclipse
Icon
= /opt/eclipse/icon.xpm
Terminal
= false
Type
= Application
Categories
= Application ; Development;
保存后就完成了eclipse的安装!









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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值