I am trying to upgrade a project (a set of plugins) from 1.6 to 1.7. So I changed in MANIFEST.MF
from Bundle-RequiredExecutionEnvironment: JavaSE-1.6
to Bundle-RequiredExecutionEnvironment: JavaSE-1.7
However, after that upgrade, if I try to export the plugin as a plugin fragment, I got this Eclipse error:
Processing inclusion from feature org.eclipse.pde.container.feature: Bundle myplugin_1.0.0 failed to resolve.:
Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Host plug-in JavaSE_0.0.0 has not been found.
Edit:
MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Auth Plug-in
Bundle-SymbolicName: __NAME__;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: AVendor
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: __A_PACKAGE_NAME__
If I change the Target-Platform to Running platform
, the error disappears (but oviously, I cannot switch the target platform for the whole project). So I suspect the target platform is wrong in some way...
EDIT:
If I remove the line
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
the export is successful.
Uh, the project used eclipse 3.5.1, which should be run on 1.6, not on 1.7. My bad.
As noted above:
I had the same problem with an RCP application which I upgraded to Java 8. Removing the 'Bundle-RequiredExecutionEnvironment' entry from the bundle manifest helped.
I had a similar problem using Eclipse Mars 4.5.0 (Build id: 20150621-1200) and Java 8.
MANIFEST.MF
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
...
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: org.osgi.framework;version="1.3.0"
I did not remove the line "Bundle-RequiredExecutionEnvironment: JavaSE-1.8", i changed it to "Bundle-RequiredExecutionEnvironment: JavaSE-1.7" and everything works fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.