【Eclipse RCP】Missing Constraint: Require-Bundle: xx

若是要使用eclipse的Form进行开发, 那么必须在plugin项目的plugin.xml编辑器里增长一项denpendency: org.eclipse.ui.forms, 其实也就是在MANIFEST.MF里增长"org.eclipse.ui.forms"到Require-Bundle.

接下去在运行的时候, 系统却报错了, log 以下:
... ...
!ENTRY org.eclipse.osgi 2 0 2008-06-15 20:58:14.781
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2008-06-15 20:58:14.781
!MESSAGE Bundle initial@reference:file:workspace/onlan.demo/ [28] was not resolved.
!SUBENTRY 2 onlan.demo 2 0 2008-06-15 20:58:14.781
!MESSAGE Missing Constraint: Require-Bundle: org.eclipse.ui.forms; bundle-version="0.0.0"
... ...

解决方法是:eclipse

选中项目并右键”Run Configuration“,在运行配置"Open Run Dialog ... "里找到相应的运行项, 而后在"Plug-ins"里先按下"Validate Plug-ins"按钮, 会提示你缺乏Bundle项, 而后按下"Add Required Plug-ins"按钮, 这样就会把运行时须要的plug-ins给自动添加上去(在这个例子里是org.eclipse.ui.froms这个插件).编辑器

相关文章
相关标签/搜索