eclipse导出的产品无法解析org.eclipse.core.runtime而#34;启动应用程序"工作

时间:2016-01-23 09:28:55

标签: eclipse dependencies export

开发基于eclipse插件的应用程序。在产品中,当我推送"启动Eclipse应用程序"时,应用程序正确运行。 当我导出应用程序并尝试启动它时,我得到org.eclipse.core.runtime没有解决。 是的,在依赖项中,我做了一个"添加所需的插件"。 如何将工作产品导出,我该怎么做?

这是当前的开发树: https://github.com/magwas/zenta/tree/export_bugreport 您可以在org.rulez.magwas.zenta.editor.build/zenta.product中找到产品文件,并在tmp / Zenta.eclipse中找到导出的产品

我在初级配置中有一个条目: org.eclipse.core.runtime autoStart =" true" STARTLEVEL =" 0"

以下是启动失败的日志:

!SESSION 2016-01-23 10:17:04.939 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_91
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.core.runtime 4 0 2016-01-23 10:17:05.560
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [1]
  Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional"
  Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.equinox.common; bundle-version="[3.6.100,4.0.0)"; visibility:="reexport"

        at org.eclipse.osgi.container.Module.start(Module.java:434)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2016-01-23 10:17:05.562
!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar was not resolved.

!ENTRY org.eclipse.core.runtime 2 0 2016-01-23 10:17:05.565
!MESSAGE Could not resolve module: org.eclipse.core.runtime [1]
  Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional"
  Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional"
  Unresolved requirement: Require-Bundle: org.eclipse.equinox.common; bundle-version="[3.6.100,4.0.0)"; visibility:="reexport"


!ENTRY org.eclipse.osgi 4 0 2016-01-23 10:17:05.566
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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)
        at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

1 个答案:

答案 0 :(得分:1)

.product文件中的起始级别配置看起来是错误的(这是在.product编辑器的Start Levels部分的Configuration选项卡上)。

对于简单的RCP,您不需要指定级别,所以只需清除它。