如何在黑莓中添加当前开发项目的库项目

2023-08-22Java开发问题
3

本文介绍了如何在黑莓中添加当前开发项目的库项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我是黑莓新手,目前我正在开发一个项目,在该项目中我需要添加一个 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 indigo 3.7 版本.

Im using eclipse indigo 3.7 version.

谁能帮我解决这个问题.

Can anyone help from me out of this.

提前致谢.

推荐答案

我的食谱:

  1. 使用 JDE 中包含的 preverify 工具手动预验证您的 jar(路径为C:Program filesResearch In MotionBlackBerry JDE xxxin",其中 x 是版本号).
  2. 从binoutput"目录中选择preverivied jar.
  3. 复制该文件并粘贴到您的 eclipse 包资源管理器中,位于工作区的根目录,或者(如果您使用的是旧插件)在 src 文件夹中.
  4. Java 构建路径 -> 库选项卡 -> 添加 jar.
  5. 享受,但是...
  1. Manually preverify your jar with the preverify tool included in the JDE (the path is "C:Program filesResearch In MotionBlackBerry JDE x.x.xin", where the x's are version numbers).
  2. Pick the preverivied jar from the "binoutput" directory.
  3. 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.
  4. Java Build Path -> libraries tab -> add jar.
  5. Enjoy, but...

这将适用于给定的项目.如果你尝试在另一个项目中做同样的事情,你会得到一个 RuntimeException 因为有同名的类(包名冲突).您可以为每个项目重构jar中的包,或者将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.

这篇关于如何在黑莓中添加当前开发项目的库项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

Eclipse 在尝试启动 Android 应用程序时卡住了
Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)...
2024-08-25 Java开发问题
14

Eclipse:无法初始化监视器线程:无法建立环回连接
Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)...
2024-08-25 Java开发问题
4

Eclipse-找不到JDK
Eclipse- JDK not found(Eclipse-找不到JDK)...
2024-08-25 Java开发问题
6

如何让 Eclipse 在 Windows 7 任务栏中表现良好?
How to make Eclipse behave well in the Windows 7 taskbar?(如何让 Eclipse 在 Windows 7 任务栏中表现良好?)...
2024-08-25 Java开发问题
9

本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)(本机方法中的致命错误:JDWP 未初始化传输,jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197))...
2024-08-25 Java开发问题
107