错误!:“javax.bluetooth.BluetoothConnectionException”的重复定义
我见过类似的问题这里为例,但我不想访问 Java SE 功能..
我有一个包含蓝牙功能代码的 .jar 文件..我尝试制作一个适用于 Blackberry 和 Windows 的 .jar 包..在这两种情况下我都使用javax.bluetooth.BluetoothConnectionException 类。这个类位于 Blackberry SDK 和 BlueCove 包中,以便在 Windows 中使用蓝牙...因此 BlueCove 包包含在 jar 文件中。.
当我尝试将 .jar 文件与 Blackberry 一起使用时,我遇到了提到的错误标题中:错误!:“javax.bluetooth.BluetoothConnectionException”的重复定义
.. 我的问题是我想使用 RIM 标准 SDK 中的一项功能,但还有另一个功能班级在 .jar 文件中具有相同的名称和相同的包,因此,我收到此错误... 是否有某种方法可以使 BlackBerry 应用程序在其自己的 SDK 而不是 . jar 文件?
我认为我不能/不应该修改任何类的包。 这里有什么想法吗?我将不胜感激。
谢谢
PS:我使用 Blackberry 的 Eclipse 插件,以防万一有用。
I have seen a similar problem here for example , but i am not trying to acces to Java SE features..
I have a .jar file with the code of a bluetooth functionality.. I try to make a .jar package that works with Blackberry and Windows.. In both cases i use the javax.bluetooth.BluetoothConnectionException
class. This class comes in the Blackberry SDK and in the BlueCove package to use Bluetooth in Windows... so the BlueCove package is included in the jar file..
When i try to use the .jar file with the Blackberry, i have the error mentioned in the title: Error!: Duplicate definition for 'javax.bluetooth.BluetoothConnectionException'
.. My problem here is that i want to use a feature that comes in the Standard SDK from RIM, but there is another class with the same name and in the same package in the .jar file, and therefore, i get this error... Is there some way to make the BlackBerry application to look for this class in its own SDK instead of the .jar file?
I think that i cannot / should not modify the package of any of the classes. Any ideas here? I would appreciate any.
Thanks
PS: I use the Eclipse plug-in for Blackberrry, in case that is usefull.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会获取 BlueCove 项目的源代码,并在 IDE(例如 Netbeans)中打开它,并重构包名称。更改(重构)包名称以避免名称冲突。
之后,将重构的 BlueCove 源代码或编译的 jar 文件包含到您的 BlackBerry 项目中。
I would get the source code of BlueCove project, and open it in a IDE, for example Netbeans, and refactor package names. Change (refactor) package names to avoid name conflict.
After that include refactored BlueCove sources or compiled jar file to your BlackBerry project.