java无法找到jre,eclipse 启动 找不到 JRE JDK的解决方法

今天在启动eclipse的时候哦出现点问题:

hadoop@steven:~/eclipse/eclipse$ ./eclipse

No protocol specified

No protocol specified

Eclipse: 无法打开显示:

** (java:12572): WARNING **: 命令 dbus-launch --autolaunch=f231fd4902ec51cc1caeae980000000c --binary-syntax --close-stderr 以非零状态数 1 退出:No protocol specified\nNo protocol specified\nAutolaunch error: X11 initialization failed.\n

No protocol specified

No protocol specified

No protocol specified

No protocol specified

Eclipse: 无法打开显示:

Eclipse:

An error has occurred. See the log file

/home/hadoop/eclipse/eclipse/configuration/1390731601942.log.

hadoop@steven:~/eclipse/eclipse$ cat /home/hadoop/eclipse/eclipse/configuration/1390731601942.log

!SESSION 2014-01-26 18:20:01.405 -----------------------------------------------

eclipse.buildId=4.3.0.M20130911-1000

java.version=1.7.0_45

java.vendor=Oracle Corporation

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=zh_CN

Framework arguments: -product org.eclipse.epp.package.standard.product

Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.standard.product

!ENTRY org.eclipse.osgi 4 0 2014-01-26 18:20:12.782

!MESSAGE Application error

!STACK 1

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

at org.eclipse.swt.SWT.error(SWT.java:4423)

at org.eclipse.swt.widgets.Display.createDisplay(Display.java:925)

at org.eclipse.swt.widgets.Display.create(Display.java:909)

at org.eclipse.swt.graphics.Device.(Device.java:156)

at org.eclipse.swt.widgets.Display.(Display.java:507)

at org.eclipse.swt.widgets.Display.(Display.java:498)

at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:691)

at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)

at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)

at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)

at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

这个是怎么回事?没有搞明白,有谁知道这个是什么情况请告诉我!

2.eclipse 启动 找不到 jre jdk的解决方法

因为我的环境变量JAVA_HOME 完全正常,echo $JAVA_HOME没有问题,那eclipse为什么找不到jre呢? 于是我手动配置eclipse.ini文件,在顶行加入:

hadoop@steven:~/eclipse/eclipse$ cat eclipse.ini

-vm

/usr/local/jdk1.7.0_45/jre/bin

-startup

plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar

--launcher.library

plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20130807-1835

-product

org.eclipse.epp.package.standard.product

--launcher.defaultAction

openFile

-showsplash

org.eclipse.platform

--launcher.XXMaxPermSize

256m

--launcher.defaultAction

openFile

--launcher.appendVmargs

-vmargs

-Dosgi.requiredJavaVersion=1.6

-XX:MaxPermSize=256m

-Xms40m

-Xmx512m

这样可以访问到jre了。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值