Linux下安装和使用Eclipse

下面是我的一些体会:

关于环境变量,这个是最无奈的,无论在windows还是linux下都需要设置,什么时候能够自动识别呢?
First install in Debian. Change to root, edit /etc/profile文件, 最后加上下面3行,如下:

exportJAVA_HOME="/usr/local/java/jre1.6.0_03"
exportPATH="/usr/local/java/jre1.6.0_03/bin":$PATH
exportCLASSPATH=.:"/usr/local/java/jre1.6.0_03/lib"


Test installation:

fxu@debian:~$su-
Password:
debian:~#java-version
javaversion"1.6.0_03"
Java(TM)SERuntimeEnvironment(build1.6.0_03-b05)
JavaHotSpot(TM)ClientVM(build1.6.0_03-b05,mixedmode,sharing)


Download, unzip the Eclipse and run. Bad luck, get error:

(eclipse:3674):Gtk-CRITICAL**:gtk_icon_theme_load_icon:assertion`GTK_IS_ICON_THEME(icon_theme)'failed
#
#AnunexpectederrorhasbeendetectedbyJavaRuntimeEnvironment:
#
#SIGSEGV(0xb)atpc=0xb7de64f3,pid=3674,tid=3077646016
#
#JavaVM:JavaHotSpot(TM)ClientVM(1.6.0_03-b05mixedmode,sharing)
#Problematicframe:
#C[libgtk-x11-2.0.so.0+0xf64f3]gtk_icon_set_render_icon+0x593
#
#Anerrorreportfilewithmoreinformationissavedashs_err_pid3674.log
#
#Ifyouwouldliketosubmitabugreport,pleasevisit:
#http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

Run it directly at the installation directory. Double click the "Eclipse":

What to do next? Try:

debian:~# apt-get install eclipse

Successfully install eclipse. Here is information:

EclipseSDK

Version:3.2.1
Buildid:M20060921-0945(Debianversion:3.2.1-4)

Run it from "Application -> Programming -> Eclipse"

没有找到JRE,这个容易,将之前下载的"/usr/local/java/jre1.6.0_03"拷贝到"/usr/lib/j2sdk1.4-sun/"就好了。

debian:~# cp -r /usr/local/java/jre1.6.0_03 /usr/lib/j2sdk1.4-sun/

欺骗一下系统。在此运行就成功了!

接下来要测试在Fedora7上的安装了。

参考:

http://www.cnblogs.com/oomusou/archive/2007/12/16/557741.html

http://goflyfreely.bokee.com/3310314.html

关于Debian安装Sun Java还可以参考

http://www.debian-administration.org/article/Installing_Sun%27s_Java_environment_on_Debian_systems
http://www.linuxforums.org/forum/debian-linux-help/53103-java-debian.html
http://crossfire.real-time.com/editors/install/linux_debian-v5.html
http://synapse.wordpress.com/2006/04/17/installing-sun-jre-on-debian/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值