我已经将PyDev插件安装到了Eclipse中。当我创建新的python项目时,我必须切换到Python视图。不幸的是,我收到了这条消息:
Could not create the view: An unexpected exception was thrown.
java.lang.RuntimeException: Can't find id: org.eclipse.jst.servlet.ui.EnhancedJavaRendering
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.findId(NavigatorContentDescriptorManager.java:459)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.computeSequenceNumbers(NavigatorContentDescriptorManager.java:476)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.access$0(NavigatorContentDescriptorManager.java:462)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager$NavigatorContentDescriptorRegistry.readRegistry(NavigatorContentDescriptorManager.java:512)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<init>(NavigatorContentDescriptorManager.java:130)
at org.eclipse.ui.internal.navigator.extensions.NavigatorContentDescriptorManager.<clinit>(NavigatorContentDescriptorManager.java:44)
at org.eclipse.ui.internal.navigator.NavigatorContentService.<clinit>(NavigatorContentService.java:93)
at org.eclipse.ui.navigator.CommonViewer.<init>(CommonViewer.java:96)
at org.python.pydev.navigator.ui.PydevPackageExplorer$PydevCommonViewer.<init>(PydevPackageExplorer.java:77)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createCommonViewer(PydevPackageExplorer.java:174)
at org.eclipse.ui.navigator.CommonNavigator.createPartControl(CommonNavigator.java:193)
at org.python.pydev.navigator.ui.PydevPackageExplorer.createPartControl(PydevPackageExplorer.java:188)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:1198)
at org.eclipse.ui.internal.PartStack.showPart(PartStack.java:1597)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:643)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.setPerspective(WorkbenchPage.java:3713)
at org.eclipse.ui.internal.WorkbenchPage.busyResetPerspective(WorkbenchPage.java:1046)
at org.eclipse.ui.internal.WorkbenchPage.access$13(WorkbenchPage.java:950)
at org.eclipse.ui.internal.WorkbenchPage$14.run(WorkbenchPage.java:3175)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchPage.resetPerspective(WorkbenchPage.java:3173)
at org.eclipse.ui.internal.handlers.ResetPerspectiveHandler.execute(ResetPerspectiveHandler.java:84)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
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)
如何处理?
答案 0 :(得分:3)
当我获得Pydev的新版本时,我遇到了同样的问题。我去了pydev.org installation instructions并注意到现在需要Java 7。一旦我升级了Java - 并确保Eclipse使用新版本 - 问题就解决了。
答案 1 :(得分:2)
虽然你在启动PyDev包浏览器时遇到了问题,但真正的问题是另一个插件 - 它无法找到org.eclipse.jst.servlet.ui.EnhancedJavaRendering,所以,我猜它是一些安装webtools时出现问题。
答案 2 :(得分:0)
我迟到了这个问题,但我确实找到了答案。虽然您可能拥有Java 1.7 JRE,但您需要安装1.7 JDK。确保Eclipse了解首选项中的更新&gt;已安装的JRE。如果您只看到Java SE 6并且确实安装了Java SE 7,请单击搜索。确保选中7。你可以通过查看About Eclipse&gt;来确保它使用1.7。安装细节(按钮)&gt;配置(选项卡),并查找-vm之后的行。
我还必须摆弄〜/ workspace下的.metadata文件夹和文件,以使Eclipse中的Pydev Package Explorer窗格正确显示。