为什么 eclipse 给我这个错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14390839/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why is eclipse giving me this error?
提问by Tom
Ok, so I installed thisplugin for eclipse. I dragged all the stuff in it's features folder into eclipses, and all the stuff from it's plugin folder to eclipse's plugin folder. I also copied the site.xml into eclipse's main folder. But when I started eclipse and tried to view class files, they gave me a eclipse error. I tried uninstalling it, but it didn't show it was installed. I also tried removing the base files I copied, but it still gave me the same error.
好的,所以我为 Eclipse安装了这个插件。我将它的 features 文件夹中的所有内容拖到 eclipses 中,并将其插件文件夹中的所有内容拖到 eclipse 的插件文件夹中。我还将 site.xml 复制到 eclipse 的主文件夹中。但是当我启动 eclipse 并尝试查看类文件时,他们给了我一个 eclipse 错误。我尝试卸载它,但它没有显示它已安装。我也尝试删除我复制的基本文件,但它仍然给我同样的错误。
The error, up close, is this:
错误,近距离,是这样的:
org.eclipse.core.runtime.CoreException: The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput').
at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:652)
at org.eclipse.ui.texteditor.AbstractTextEditor.run(AbstractTextEditor.java:3200)
at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:759)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649)
at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3218)
at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3245)
at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:828)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:647)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
at org.eclipse.ui.internal.EditorManager.runWithException(EditorManager.java:972)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench.runWithException(Workbench.java:1600)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4140)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3757)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
at org.eclipse.ui.internal.Workbench.access(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
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:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
And a screenshot of the screen is this:
屏幕截图是这样的:
回答by duemir
You have not installed the plugin the proper way, it most likely will not work. JD-Eclipse page tells you how to install it correctly. Even if you download archived Update Site
, you must use the Install New Software...
dialog. The only thing you should do differently in given instructions is in New Repository
dialog instead of pasting the Update Site
URL into an input - click Archive...
button and select zip file you downloaded.
您没有以正确的方式安装插件,它很可能无法正常工作。JD-Eclipse 页面告诉您如何正确安装它。即使您下载了 archived Update Site
,您也必须使用该Install New Software...
对话框。在给定的说明中唯一应该做的不同是在New Repository
对话框中而不是将Update Site
URL粘贴到输入中 - 单击Archive...
按钮并选择您下载的 zip 文件。
You should not have broken the whole installation by simply copying the jar files into respective folders, but apparently somehow it was corrupted or some bug exposed which threw the given Exception. Exception, actually, looks like it is the Standart JDT Class Editor which failed not the JD-Eclipse.
您不应该通过简单地将 jar 文件复制到相应的文件夹来破坏整个安装,但显然它已损坏或暴露了一些错误,从而引发了给定的异常。实际上,异常看起来是标准 JDT 类编辑器失败而不是 JD-Eclipse。
I suggest you shutdown Eclipse, delete all the files you copy pasted manually, launch it again and try to open some class file in the Workspace. If it works, try to install JD-Eclipse properly (including Microsoft Visual C++ 2008 Express Edition if you are on Windows). If it does not work, try re-installing Eclipse.
我建议您关闭 Eclipse,删除您手动复制粘贴的所有文件,再次启动它并尝试在工作区中打开一些类文件。如果可行,请尝试正确安装 JD-Eclipse(如果您使用的是 Windows,则包括 Microsoft Visual C++ 2008 Express Edition)。如果它不起作用,请尝试重新安装 Eclipse。
回答by Iswanto San
What and where you put class files that you want to view ? Are that class file exists in your workspace? If not, try to put your class file in your workspace
您将要查看的类文件放在什么位置?您的工作区中是否存在该类文件?如果没有,请尝试将您的类文件放在您的工作区中
回答by Ari
For quick and dirty checks, I've found a better option: go to http://jd.benow.ca/and drag and drop your class file onto the "Live Demo"->"Input Files" section at the bottom. Worked like a charm!
对于快速和脏检查,我找到了一个更好的选择:转到http://jd.benow.ca/并将您的类文件拖放到底部的“实时演示”->“输入文件”部分。像魅力一样工作!