Java 8 amp; Missing required capability Require-Capability: osgi.ee; filter=quot;(amp;(osgi.ee=JavaSE)(version=1.8))quot;(Java 8 和缺少所需的能力Require-Capability:osgi.ee;过滤器=“(amp;(osgi.ee=JavaSE)(版本=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 Compliance Compiler 合规级别
当我启动产品时,我在 Launching 选项卡中检查了我使用 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导出能力.也许您可以简单地尝试使用最新的春分版本.不确定这是否有帮助.您还可以尝试设置框架属性(使用 -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"
见
- eclipse列表上同样的问题
这篇关于Java 8 和缺少所需的能力Require-Capability:osgi.ee;过滤器=“(&(osgi.ee=JavaSE)(版本=1.8))"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Java 8 和缺少所需的能力Require-Capability:osgi.ee;过滤器=“(&(osgi.ee=JavaSE)(版本=1.8))"
基础教程推荐
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- 降序排序:Java Map 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01