我突然无法打开 Eclipse。当我尝试时,eclipse 加载屏幕会出现一分钟:
然后我收到此错误消息:“发生错误。请参阅日志文件 {path to log file}”
当我检查日志文件时,我发现根本原因是无法找到 WToolkitHookQTJA 类:
java.lang.NoClassDefFoundError: com/mercury/ftjadin/hooks/interfaces/WToolkitHookQTJA
at org.eclipse.swt.widgets.Shell.<init>(Shell.java:297)
at org.eclipse.swt.widgets.Shell.internal_new(Shell.java:419)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.ui.internal.WorkbenchPlugin.getSplashShell(WorkbenchPlugin.java:1360)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:114)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
引起:java.lang.ClassNotFoundException: com.mercury.ftjadin.hooks.interfaces.WToolkitHookQTJA 在 org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal( BundleLoader.java:432) 在 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345) 在 org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337) 在 org .eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160) 在 java.lang.ClassLoader.loadClass(ClassLoader.java:357)
我怀疑发生这种情况的原因是因为我的系统路径上有两个 java,最近我不得不让 jdk8(即不在 System32 中的那个)首先出现在系统路径中,以便获得其他东西好好工作。当我打开 cmd 并输入where java
时,我得到:
C:\Program Files\Java\jdk1.8.0_31\bin\java.exe
C:\Windows\System32\java.exe
所以我的问题是:如何在不(a)将 jdk8 移动到 System32 java 之后以及(b)不重新安装 eclipse 的情况下再次打开 eclipse?