Host plug-in JavaSE has not been found in RCP application with Java 10

拜拜、爱过 提交于 2019-12-06 06:33:05

This seems to be an Eclipse bug. Eclipse seems not to able to deal with JavaSE-10 properly.

The simplest solution at the moment is just to use Bundle-RequiredExecutionEnvironment: JavaSE-9 rather than JavaSE-10 and put up with the warning that this doesn't match the JRE container.

Since OSGi 4.3, the most appropriate way to specify a minimum Java version is using the Required-Capability header, as in:

Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version>=1.10))"

I have had success fixing the reported error by replacing all occurrences of Bundle-RequiredExecutionEnvironment with the above line. In PDE, you may get a warning on the manifest file, but it can be safely ignored. Product validation and product exports seems to work without issue. One thing I'm not sure however is how P2 reacts when fed bundles that do not contains the BREE header.

Alternatively, Eclipse 2018-09 is now out, and seems to provide a JavaSE-10 environment description (just in time for JavaSE 10 deprecation...); I haven't tested yet JavaSE 11 support (available as a plugin for Eclipse 2018-09).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!