Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top