在Eclipse中运行RCP项目时出错

时间:2018-03-22 01:55:06

标签: java eclipse eclipse-plugin eclipse-rcp

我继承了一个现有的RCP项目,我对这种类型的项目如何运作完全不了解。

我正在为Java Developers运行Eclipse IDE(版本:Oxygen.3 Release(4.7.3))。

当我尝试将项目作为Eclipse应用程序运行时,出现以下错误:

java.lang.NullPointerException
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:122)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:511)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    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:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

我已经看到了针对此问题的一些解决方案,说org.eclipse.equinox.dsorg.eclipse.equinox.event需要包含在插件依赖项中,但这并没有解决我的问题。

1 个答案:

答案 0 :(得分:1)

要解决此问题,我执行了以下操作:

  1. 删除我的运行配置:运行&gt;运行配置,然后选择配置,按下大红色x按钮,关闭
  2. 创建的产品配置:文件&gt;新&gt;其他,然后插件开发&gt;产品配置,接下来,选择项目,提供产品配置文件名,完成
  3. 应自动打开产品配置文件(如果没有,请打开它),然后选择目录选项卡,并添加org.eclipse.equinox.event插件
  4. 选择配置标签,将org.eclipse.equinox.event添加到开始级别并将Auto-Start设置为true