linux中eclipse不运行,Ubuntu 14.04 下Eclipse 3.7.2 无法启动解决

解决Ubuntu 14.04 下Eclipse 3.7.2 不能启动,报Could not detect registered XULRunner to use 或 org.eclipse.swt.SWTError: XPCOM 等问题的处理。

对于eclipse 3.7.2在ubuntu 14.04下不能启动,需要在

eclipse/configuration 目录下的config.ini文件内增加一行org.eclipse.swt.browser.DefaultType=mozilla

#This configuration file was written by: org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxFwConfigFileParser

#Thu Jan 15 11:18:24 CST 2015

org.eclipse.update.reconcile=false

eclipse.p2.profile=epp.package.jee

osgi.instance.area.default=@user.home/workspace

osgi.framework=file\:plugins/org.eclipse.osgi_3.7.2.v20120110-1415.jar

equinox.use.ds=true

eclipse.buildId=M20120208-0800

org.eclipse.swt.browser.DefaultType=mozilla

osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110815-1438.jar@1\:start

org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info

eclipse.product=org.eclipse.platform.ide

osgi.splashPath=platform\:/base/plugins/org.eclipse.platform

osgi.framework.extensions=reference\:file\:Javax.transaction_1.1.1.v201105210645.jar

osgi.bundles.defaultStartLevel=4

eclipse.p2.data.area=@config.dir/../p2/

eclipse.application=org.eclipse.ui.ide.workbench

这样启动就不会报错了 这是我google出来的  我不能说明原因。

b8598b6d9ec639ff8bae9de446104993.png

能启动之后 当你点击内嵌的浏览器 或者 webservie 浏览器时 不是报错  没有反映 就是在当前窗体外启动了外部浏览器

另外编辑jsp时报错 Could not detect registered XULRunner to use

这些都是因为为eclipse 的内嵌浏览器 没有生效。

我们应该这样做

对一eclipse 3.7.2 版本

下载xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar.bz2

解压到一个合适的问题 比如我解压到了 /opt/commonTools/下 在/opt/commonTools/下就有一个xulrunner目录。

tone@ubuntu:/opt/commonTools$ ls -l

总用量 43176

drwxrwxr-x 13 tone tone    4096 12月 20 12:35 Android-sdk-linux

drwxr-xr-x  6 root root    4096 11月 17 11:08 apache-ant-1.9.3

drwxr-xr-x  7 root root    4096 11月 17 10:30 apache-maven-3.2.2

drwxr-xr-x  9 root root    4096 10月  9  2009 jdk1.5.0_22

-rwxr-xr-x  1 root root 44191305  1月 13 16:16 jdk-1_5_0_22-linux-amd64.bin

drwxr-xr-x 11 root root    4096  3月  2  2012 xulrunner

接下来边界eclipse的配置文件。eclipse.ini 增加一行-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/commonTools/xulrunner

-startup

plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar

--launcher.library

plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505

-product

org.eclipse.epp.package.jee.product

--launcher.defaultAction

openFile

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize

256m

--launcher.defaultAction

openFile

-vmargs

-Djava.library.path=/usr/lib/x86_64-linux-gnu/jni

-Dorg.eclipse.swt.browser.XULRunnerPath=/opt/commonTools/xulrunner

-Dosgi.requiredJavaVersion=1.5

-XX:MaxPermSize=256m

-Xms40m

-Xmx512m

经过以上的错误 你的eclipse 和谐了,效果如下:

dfbe50a7169abad5209bef63a61ee571.png

1f251fc6fd1c959d579e44e0db9a9676.png

db426187bd87ef080f0f347144dabb31.png

针对Could not detect registered XULRunner to use  或 org.eclipse.swt.SWTError: XPCOM 的解决办法(安装XULRunner) 针对最新的myeclipse 2014 依然有效

--------------------------------------分割线 --------------------------------------

--------------------------------------分割线 --------------------------------------

0b1331709591d260c1c78e86d0c51c18.png

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值