Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

New Developer
Posts: 2
Registered: ‎07-14-2009
My Device: Not Specified

Java, USB and BBDevMgr.exe

I've been trying to convert the C++ USBClient.cpp example into Java (USBClient.cpp is the PC side of the BB UsbDemo.java sample).

I've nearly got it working, but the last step has defeated me for the moment Smiley Happy. I thought I'd pass on what I've done to this forum.

USBClient.cpp uses BB's BBDevMgr.exe as a COM component. There are several Java-COM bridge tools around, but the only one that could deal with BBDevMgr.exe was J-Integra for COM, a commercial tool with a 30-day free trial (http://j-integra.intrinsyc.com/products/com/).

It generated a large set of Java classes, which allowed me to re-implement USBClient.cpp in Java. The code almost works except for the Java version of writePacket() which crashes the JVM. The problem means I cannot send messages from the PC to the BB. However, the PC-side can receive messages from the BB.

The error in writePacket() is triggered down at the lowest level of J-Integra when the function's arguments are being converted into COM data prior to its call. My guess is that the type library for BBDevMgr, which J-Integra uses to generate the Java code, is not quite correct.

All my tests were done on the BB JDE 4.7.0 device simulator.

One general comment is that RIM should really offer a Java version of the BBDevMgr COM component.

Another comment is that since the BB cannot be a USB host, it limits the usefulness of the USB port for programming.