简体   繁体   English

导出Eclipse RCP产品->“未解决的需求:Require-Bundle:org.eclipse.ui.views”

[英]Export Eclipse RCP Product -> “Unresolved requirement: Require-Bundle: org.eclipse.ui.views”

I develop a feature based RCP application (using gef and draw2d) in Eclipse Mars and I want to generate an executable out of the product. 我在Eclipse Mars中开发了基于功能的RCP应用程序(使用gef和draw2d),我想从产品中生成可执行文件。 For this I use the "Eclipse Product export wizard". 为此,我使用“ Eclipse产品导出向导”。 But there is an error, when I start the executable: 但是,当我启动可执行文件时出现错误:

!SESSION 2016-06-28 13:54:38.816 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments:  -clearPersistedState
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -clearPersistedState

!ENTRY org.eclipse.equinox.app 0 0 2016-06-28 13:54:40.239
!MESSAGE Product interfaces.interfaces could not be found.

!ENTRY interfaces 2 0 2016-06-28 13:54:40.596
!MESSAGE Could not resolve module: interfaces [3]
  Unresolved requirement: Require-Bundle: org.eclipse.ui.views


!ENTRY org.eclipse.osgi 4 0 2016-06-28 13:54:40.598
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
    at org.eclipse.emf.common.util.URI$URIPool$PlatformAccessUnit.setValue(URI.java:865)
    at org.eclipse.emf.common.util.URI$URIPool.intern(URI.java:1949)
    at org.eclipse.emf.common.util.URI.createPlatformPluginURI(URI.java:2718)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.determineApplicationModelURI(E4Application.java:426)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:350)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:254)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:145)
    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(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:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)

I think the problem is that not all required libraries/plug-ins are included in the generated folder. 我认为问题在于,并非所有必需的库/插件都包含在生成的文件夹中。

The same error occurs when I try to start the application via "product -> Overview tab -> Launch an Eclipse application". 当我尝试通过“产品->概述选项卡->启动Eclipse应用程序”启动应用程序时,会发生相同的错误。 This problem can be solved by clicking "Run Configuarions -> Plug-ins -> Add Required Plug-ins". 通过单击“运行配置->插件->添加所需的插件”可以解决此问题。 I assume that those Plug-ins which are added by "Add Required Plug-ins" are missing to run the executable. 我假设缺少由“添加所需的插件”添加的那些插件来运行可执行文件。

Can anyone tell me, how to tell eclipse to include them when building the executable? 谁能告诉我,在构建可执行文件时如何告诉eclipse包括它们? Or am I missing something else? 还是我想念其他东西?

I have already checked all boxes in "plug-in -> Build -> Binary Build/Source Build". 我已经在“插件->构建->二进制构建/源构建”中选中了所有复选框。 I have also tried to include the missing libraries in the Build Tab. 我还尝试在“构建”选项卡中包括缺少的库。 But nothing seems to work :/ 但是似乎没有任何效果:/

thanks! 谢谢!

Thomas 托马斯

Assuming you are using an xxx.product file for your build. 假设您使用xxx.product文件进行构建。 You need to go to the 'Contents' tab and click 'Add Required' to add the required plugins (or features) to the build. 您需要转到“目录”选项卡,然后单击“添加所需的”以将所需的插件(或功能)添加到构建中。

This is separate from the 'Run Configuration' plugin configuration. 这与“运行配置”插件配置不同。

Thanks for the fast response! 感谢您的快速回复!

Your hint gave me the clue to find the answer. 您的提示给了我找到答案的线索。

I had to add 我必须添加

  • org.eclipse.ui org.eclipse.ui
  • org.eclipse.help org.eclipse.help
  • org.eclipse.gef org.eclipse.gef
  • ... ...

to the 'Included Plug-ins' Tab within my feature (which I include in my product). 到功能(包含在产品中)的“包含的插件”标签中。

Thanks! 谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未解决的要求:Require-Bundle:org.eclipse.core.databinding.beans; 束版本=“1.2.200” - Unresolved requirement: Require-Bundle: org.eclipse.core.databinding.beans; bundle-version=“1.2.200” 如何修复 Eclipse RCP 中的“缺少约束:Import-Package:”和“Require-Bundle” - How to fix "Missing Constraint: Import-Package:" and "Require-Bundle" in Eclipse RCP Eclipse RCP 目标平台:Bundle 'org.eclipse.ui.views.properties.tabbed' 无法解析 - Eclipse RCP Target Platform: Bundle 'org.eclipse.ui.views.properties.tabbed' cannot be resolved eclipse RCP maven / tycho缺少要求“ bundle org.eclipse.e4.core.di” - eclipse RCP maven/tycho missing requirement 'bundle org.eclipse.e4.core.di' 无法使用RCP Eclipse将视图强制转换为org.eclipse.ui.IViewPart - Views cannot be cast to org.eclipse.ui.IViewPart using RCP eclipse 为什么Eclipse RCP产品构建在无头构建期间无法在org.eclipse.ui中找到类? - Why an Eclipse RCP product build can not find classes in org.eclipse.ui during headless build? 如何使用较小的JAR导出Eclipse RCP产品 - How to export a eclipse RCP product with smaller JARs 使用某些JDK的Eclipse RCP产品导出 - Eclipse RCP product export using a certain JDK 无法将Eclipse RCP应用程序导出为产品 - Unable to export Eclipse RCP application as a product Eclipse rcp 导出产品抛出 NullPointerException - Eclipse rcp export product throws NullPointerException
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM