I recently moved to doing BlackBerry development at work which required me to go through setting up a new environment. I had successfully setup iPhone and Android environments by simply following the directions on their web sites. Not surprisingly, Apple has the easiest development environment to get setup. Google had a few more steps but made up for it with good documentation. To get started on Blackberry development I installed a bunch of software from this page: Eclipse for Blackberry Development, Blackberry Java Development Environment (JDE), Torch Simulator, MDS Simulator. Ok good to go. I was able to build our product and run it on a simulator. Next I started playing around with the app. Setting breakpoints and getting an idea of how things were plugged together. I wanted to try out the voice search feature and thought the simulator would use the PC mic but it was not working. I figured it should be easy to load the app on a device and eliminate the simulator as the cause of the problem. The JDE comes with a tool called JavaLoader for placing builds on the device. I plugged the device into the computer and ran the tool. It dumped info to the terminal of what it was doing and left me with an error message: HRESULT: 80040154. With a quick search I found that error code meant the a COM class could not be instantiated. I figured I probably did not install the software which allowed for communication with the device over USB. But what was it? With COM to create an object you pass in a GUID and bam you have yourself an instance of some class (an oversimplification but good enough for this). Underneath the hood the program is really digging through the Windows registry looking for that GUID. If I could find that GUID I could easily find what I was missing with a quick web search. To find the GUID I fired up procmon and reran the JavaLoader program. Procmon is magic in a box. It shows all the different events taking place with the file system and registry for the whole system or a particular process. It helped me find the GUID in question as seen in the picture below:
I searched for BA3D0120-E617-4F66-ADCA-585CC2FB86DB
and found a stackoverflow entry indicating that Blackberry Desktop Manager needed to be installed. Once I installed it everything work as expected. Lesson today: Good tools make life better.