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

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

问题描述

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



这里从帮助菜单>关于>安装细节>配置选项卡

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

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





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

  Bundle-RequiredExecutionEnvironment:JavaSE-1.8 

我在产品文件中使用这个插件。当我尝试验证它,我得到以下错误:





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

 !ENTRY org.eclipse.osgi 2 0 2014-07-10 08:14:22.042 
!MESSAGE一个或多个软件包未解决,因为以下根限制未解决:
!SUBENTRY 1 org.eclipse.osgi 2 0 2014-07-10 08:14:22.043
!消息捆绑更新@ ******** / myplugin /未解决。
!SUBENTRY 2 myplugin 2 0 2014-07-10 08:14:22.044
!MESSAGE缺少必需的能力需求能力:osgi.ee;过滤器= (及(osgi.ee = JavaSE的)(版本= 1.8))。






我已经尝试验证了很多: p>

首选项> Java>已安装的JRE





首选项> Java>已安装的JRE>排除环境





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





当我启动该产品时,我查看了启动标签,我使用jre8作为执行环境。



我甚至试图将$ code> Java运行时环境 运行配置对话框





我e尝试不同的设置。






有什么问题?



这是一个已知的问题吗?

解决方案

错误意味着您的包具有需求能力:osgi.ee; filter =(&(osgi.ee = JavaSE)(version = 1.8))其清单中的条目。所以这意味着只有当有一个bundle提供这个功能时,bundle才会开始。



在osgi.ee功能的情况下,OSGi框架(等分)应该提供这种能力。显然,它不这样做。



所以一种方法是从你的清单中删除标题。
另一个是使分出口的能力。也许你可以简单地尝试用最新的equinox版本。不知道这是否有帮助。
您还可以尝试设置框架属性(使用-D):
org.osgi.framework.system.capabilities = osgi.ee; osgi.ee =JavaSE;版本:List =1.0,1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8



请参阅




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

Here from the Help Menu > About > Installation Detail > Configuration Tab:

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

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

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:

Preferences > Java > Installed JREs

Preferences > Java > Installed JREs > Excution Environments

Preferences > Java > Compiler: JDK Compliance Compiler compliance level

When I start the product, I checked in the Launching tab that I use the jre8 as execution 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.


What is wrong?

Is it a known issue?

解决方案

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.

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

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"

See

这篇关于Java 8&缺少所需能力需求能力:osgi.ee;滤波器= QUOT;(及(osgi.ee = JavaSE的)(版本= 1.8))"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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