eclipse库包 - 无法从某些库导出包 [英] eclipse library bundle - fails to export packages from some libraries

查看:113
本文介绍了eclipse库包 - 无法从某些库导出包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在eclipse 3.5中创建了一个简单的插件项目,它仅存储第三方库,供日常RCP应用程序中的其他软件包使用。按预期工作:我编辑了清单,导出所需的包,并将库添加到构建路径(项目构建路径以及清单构建路径)。

I've created a simple plugin project in eclipse 3.5 that just stores third-party libraries for the use by other bundles in an eclipse RCP application. Worked as expected: I edited the manifest, exported the required packages and added the libraries to the build path (project build path as well as manifest build path).

有些日子后来我向该项目添加了另一个jar,执行了相同的步骤(导出包,将库添加到构建路径),但这次我无法从其他捆绑包中导出的包导入类。包装在清单编辑器上清晰可选,但类中的导入语句只是用卷曲的红线嘲笑我。从捆绑包导出的其他包导入类仍然可以工作,只有新添加的lib中的类才是不可见的。

Some days later I added another jar to that project, did the same steps (exporting a package, adding the library to the build path(s)) but this time I can't import classes from that exported package in other bundles. The package was clearly selectable on the manifest editor but import statements in classes just taunt me with curly red lines. Importing classes from other packages exported by the bundles still works, only classes from the newly added lib remain invisible.

有没有人知道我可能错过了什么?我很卡住,不知道如何说服谷歌向我显示那个丑陋的问题的解决方案。

Has anyone has an idea what I might have missed? I'm pretty stuck and have no idea how to convince google to show me the solution to that ugly issue...

推荐答案

检查以下内容:


  1. 确保它们位于Build
    配置 - >订单和导出
    区域,以及

  2. 确保您在清单中导出包
    (PDE工具
    - >打开清单 - >运行时选项卡)

  3. 在与上述相同的地方,make
    确保JAR文件位于
    清单类路径中。

  4. (正如Al说的
    以下),确保build
    属性的jars标记为
    排除(虽然这不太可能
    你的问题,因为你收到错误
    编译)。

  1. Make sure they are in the Build Configuration -> Order and Export area, and they are check for export.
  2. Make sure you have the packages exported in the manifest (PDE Tools -> Open Manifest -> Runtime tab)
  3. In the same place as above, make sure the JAR files are in the manifest classpath.
  4. (as Al says below), make sure the build properties has your jars marked for exclusion (though this is not likely your issue as you are getting errors compiling).

如果所有这一切都完成了(它仍然不工作),做一个干净的建立一个重启eclipse。有时候,Eclipse对此有点困惑,重启有帮助。

If all of this is done (and it's still not working), do a clean build an restart eclipse. Sometimes the Eclipse gets a little confused about this and a restart helps.

这篇关于eclipse库包 - 无法从某些库导出包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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