Missing Constraint: Require-Bundle: org.eclipse.ui.forms ... ...

来源:互联网 发布:北京知金教育官网 编辑:程序博客网 时间:2024/06/08 03:25

这个问题让我很头痛呀, 还好, 在eclipse的网站上找到答案了, 原因如下:

如果要使用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"
... ...

解决方法是在运行配置"Open Run Dialog ... "里找到相应的运行项, 然后在"Plug-ins"里先按下"Validate Plug-ins"按钮, 会提示你缺少Bundle项, 然后按下"Add Required Plug-ins"按钮, 这样就会把运行时需要的plug-ins给自动添加上去(在这个例子里是org.eclipse.ui.froms这个插件).

原创粉丝点击