如何解决这个eclipse启动错误?

时间:2013-02-22 18:42:37

标签: java eclipse eclipse-plugin

我尝试了几个解决修复eclipse启动问题的答案。

我试过

eclipse.exe -clean didn't work. 
eclipse.exe -clean -data C:\prectice\java\ didn't work
eclipse.exe -clean --lanuncher.ini elipse.ini didn't work.

这是错误: -

An error has occurred. See the log file
C:\app\eclipse\configuration\1361558300022.log.

我不知道如何启动eclipse。请问我如何解决它。谢谢你的支持!

日志文件内容:

!SESSION 2013-02-22 20:39:37.176 -----------------------------------------------
eclipse.buildId=v21.1.0-569685
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product com.android.ide.eclipse.adt.package.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product com.android.ide.eclipse.adt.package.product

!ENTRY org.eclipse.osgi 4 0 2013-02-22 20:39:39.898
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: com/mercury/javashared/agentloader/AgentBootstrap
    at org.eclipse.swt.widgets.Display.<init>(Display.java:480)
    at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:716)
    at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.ClassNotFoundException: com.mercury.javashared.agentloader.AgentBootstrap
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 17 more

3 个答案:

答案 0 :(得分:3)

清除这些环境变量; QTP带来了他们:

JAVA_OPTIONS

-Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar

IBM_JAVA_OPTIONS

-Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar

JAVA_TOOL_OPTIONS

-agentlib:jvmhook

答案 1 :(得分:1)

这也可以通过在启动应用程序之前为环境变量创建bat文件并删除它来解决,请参阅解决方案的链接。

来源:https://stackoverflow.com/a/24685843/6345724

答案 2 :(得分:0)

非常感谢addie。你给我一些关于QTP的线索。其实我有QTP。和QTP一起还可以。但是当我试图卸载qtp时,它没有成功并留下了一些文件。所以我找到qtp附带的所有文件并手动删除它们。删除所有文件后,eclipse正常启动。