Java 8 &缺少所需的能力 Require-Capability: osgi.ee;filter="(&(osgi.ee=JavaSE)(version=1.8))"; [英] Java 8 & Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))"

查看:288
本文介绍了Java 8 &缺少所需的能力 Require-Capability: osgi.ee;filter="(&(osgi.ee=JavaSE)(version=1.8))";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是运行 Java 8 的 Eclipse Luna win32.x86_64.

I have using Eclipse Luna win32.x86_64 runing with Java 8.

这里来自 Help Menu >关于 >安装细节 >配置标签:

java.runtime.version=1.8.0_05-b13
java.version=1.8.0_05

我创建了新的插件项目,请求JavaSE-1.8作为执行环境:

I have created new plug-in project, requesting JavaSE-1.8 as Execution Environment:

myplugin/META-INF/MANIFEST.MF 文件中,我当然有:

In the myplugin/META-INF/MANIFEST.MF file I have of course:

 Bundle-RequiredExecutionEnvironment: JavaSE-1.8

我在产品文件中使用此插件.当我尝试验证它时,出现以下错误:

I use this plugin in a product file. When I try to validate it, I get following error:

当然,如果我启动产品,我会得到:

Of course if I start the product, I get:

!ENTRY org.eclipse.osgi 2 0 2014-07-10 08:14:22.042
!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-10 08:14:22.043
!MESSAGE Bundle update@********/myplugin/ was not resolved.
!SUBENTRY 2 myplugin 2 0 2014-07-10 08:14:22.044
!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))".

<小时>

我尝试了很多验证:


I have tried to verify a lot:

首选项 > Java > 已安装的 JRE

首选项 > Java > 已安装的 JRE > 执行环境

首选项 > Java > 编译器:JDK 合规性编译器合规性级别

当我启动产品时,我在启动选项卡中检查了我使用 jre8 作为执行环境.

When I start the product, I checked in the Launching tab that I use the jre8 as execution environment.

我什至尝试在 Run Configurations 对话框中更改 Java Runtime Environment:

I have even tried to change the Java Runtime Environment in the Run Configurations Dialog:

我尝试了不同的设置.它们都不起作用.

I have tried different settings. None of them works.

怎么了?

这是一个已知问题吗?

推荐答案

该错误意味着您的 bundle 具有 Require-Capability: osgi.ee;filter="(&(osgi.ee=JavaSE)(version=1.8))" 其清单中的条目.因此,这意味着仅当存在提供此功能的捆绑包时,捆绑包才会启动.

The error means that your bundle has a Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=1.8))" entry in its manifest. So this means the bundle will only start when there is a bundle that provides this capability.

在 osgi.ee 功能的情况下,OSGi 框架 (equinox) 应该提供此功能.显然它不这样做.

In case of the osgi.ee capability it is the OSGi framework (equinox) that should provide this capability. Apparently it does not do this.

因此,一种方法是从您的包清单中删除标头.另一种是使 equinox 导出功能.也许您可以简单地尝试使用最新的 equinox 版本.不确定这是否有帮助.您还可以尝试设置框架属性(使用 -D):org.osgi.framework.system.capabilities=osgi.ee;osgi.ee="JavaSE";version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"

So one approach would be to remove the header from you bundle Manifest. The other would be to make equinox export the capability. Perhaps you could simply try with the newest equinox version. Not sure if this helps though. You could also try to set the framework property (using -D): org.osgi.framework.system.capabilities=osgi.ee; osgi.ee="JavaSE";version:List="1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8"

这篇关于Java 8 &amp;缺少所需的能力 Require-Capability: osgi.ee;filter="(&amp;(osgi.ee=JavaSE)(version=1.8))";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆