如何添加库项目与黑莓目前的发展项目 [英] How to add library project with the current development project in blackberry
问题描述
我是新的黑莓,我目前正在开发一个项目,该项目中我需要添加一个jar(KSOAP)文件。为此,我创建了一个项目,我说这是我所需要的补充它构建路径的jar文件。最后,我尝试设置黑莓项目依赖与开发项目,我不能够得到选项来选择库项目。我指的http://www.blackberryforums.com/developer-forum/155972-blackberry-ksoap2-tutorial.html此网站。
I'm new to blackberry, currently I'm developing a project, in that project I need to add a jar(Ksoap) file. For this I created a project and I added the jar file which I required the added it on build path. Finally I try to set blackberry project dependencies with the development project, I could not able to get option to select library project. I refer http://www.blackberryforums.com/developer-forum/155972-blackberry-ksoap2-tutorial.html this site.
即时通讯使用eclipse靛蓝3.7版本。
Im using eclipse indigo 3.7 version.
任何人都可以从我帮忙出这一点。
Can anyone help from me out of this.
先谢谢了。
推荐答案
我的食谱:
- 手动preverify与
preverify
工具,你的JAR包含在JDE(路径为C:\\ Program Files文件\\ Research In Motion公司\\黑莓JDE XXX \\斌,其中x是版本号)。 - 从斌\\输出目录中挑选preverivied罐子。
- 复制该文件,并在Eclipse包浏览器粘贴在工作区的根,或者(如果您使用的是旧插件)的
的src
文件夹内。 - Java构建路径 - >库选项卡 - >添加JAR
- 享受,但是...
- Manually preverify your jar with the
preverify
tool included in the JDE (the path is "C:\Program files\Research In Motion\BlackBerry JDE x.x.x\bin", where the x's are version numbers). - Pick the preverivied jar from the "bin\output" directory.
- Copy the file and paste in your eclipse package explorer, at the root of the workspace, or (if you are using old plugin) inside the
src
folder. - Java Build Path -> libraries tab -> add jar.
- Enjoy, but...
这将对于给定的项目。如果你试图做同样在另一个项目中,你会因为有类具有相同的名称(包名称冲突)获得一个RuntimeException。您可以重构包罐中为每个项目,或jar添加到库项目中,而不是主体工程,让其他项目可以使用它。
This will work for a given project. If you try to do the same in another project, you'll get a RuntimeException because there are classes with the same name (the package names collide). You can refactor the packages in jar for each project, or add the jar to a library project instead of the main project, so that other projects can use it.
这篇关于如何添加库项目与黑莓目前的发展项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!