Eclipse rcp插件添加到目标可以在编译时解析,但不能在运行时解析

发布于 2024-09-25 22:07:54 字数 363 浏览 3 评论 0原文

我已将插件添加到 RAP 应用程序的目标平台。我可以在处理项目时毫无问题地引用它,并且编译不会出现错误。该插件还显示在我的构建路径的插件依赖项库中。但是,当我运行应用程序时,osgi 框架给了我异常A

org.osgi.framework.BundleException: The bundle "ate_rap_1.0.0.qualifier [98]" could not
be resolved. Reason: Missing Constraint: Require-Bundle: com.richclientgui.rcptoolbox;
bundle-version="0.0.0"

如何添加插件以便我可以在我的应用程序中使用它?

I've added a plugin to the target platform of my RAP application. I can reference it without issue without any problems while working on the project, and the compile happens without errors. The plugin also shows up in the plugin dependiencies library of my build path. However, when I run the application, the osgi framework gives me the exceptionA

org.osgi.framework.BundleException: The bundle "ate_rap_1.0.0.qualifier [98]" could not
be resolved. Reason: Missing Constraint: Require-Bundle: com.richclientgui.rcptoolbox;
bundle-version="0.0.0"

How do I add a plugin so that I can use it with my application?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

贱贱哒 2024-10-02 22:07:54

首先,在使用 OSGi 时不要使用插件依赖项。 OSGi 不知道 IDE 中的这些依赖项,它只关心包在其包清单中定义的依赖项。因此,您必须在 MANIFEST.MF(“依赖项”选项卡)中定义依赖项。

其次,您必须将此捆绑包添加到您的启动配置中。在 Eclipse 中,运行... ->运行配置...选择您的启动配置,转到“捆绑包”选项卡并检查您的其他插件。启动之前,请单击“捆绑包”选项卡中的“验证捆绑包”。

First of all, do not use plugin dependencies when you work with OSGi. OSGi doesn't know about your those dependencies in your IDE, it only cares for the dependencies that a bundle defines in its bundle manifest. Therefore, you have to define a dependency in the MANIFEST.MF (Dependencies tab) instead.

Second, you have to add this bundle to your launch configuration. In Eclipse, go Run... -> Run Configurations... Select your launch config, go to the Bundles tab and check your additional plug-in. Before you launch, click on "Validate Bundles" in the Bundles tab.

甚是思念 2024-10-02 22:07:54

您的应用程序是从 PDE 构建的功能?如果是这样,您可能需要将新插件添加到主要功能中包含的插件列表中。

Is your application built from a PDE feature? If so you may need to add the new plugin to the list of plugins included in your main feature.

夕色琉璃 2024-10-02 22:07:54

要将插件添加到基本 RAP 应用程序,请选择“文件”->“新建”->“其他”,然后在向导中选择“插件开发”->“来自现有 Jar 档案的插件”。这将创建一个托管该插件的项目,该插件可以添加到构建路径中。添加到构建路径后,将此插件作为依赖项添加到 MANIFEST.MF 中。最后,在应用程序的运行配置中,选择“捆绑包”选项卡并确保选中要添加的捆绑包。使用“添加所需捆绑包”按钮可以轻松完成此操作。现在该项目应该与捆绑包一起在 Eclipse 中运行。

To add a plugin to a basic RAP application, select File->New->Other and in the wizard, select Plug-in Development->Plug-in from Existing Jar Archives. This will create a project hosting that plugin which may be added to the build path. After adding to the build path, add this plugin as a dependencies in your MANIFEST.MF. Finally, in the run configuration for the application, select the Bundles tab and make sure the bundle you want to add is checked. This is easily done with the "Add Required Bundles" button. Now the project should run in Eclipse with the bundle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文