Blackberry applications are written in Java. Since the java mantra is write once, test everywhere. er. sorry, run everywhere. You would think that you could choose whatever OS you would like to develop for the Blackberry. While the documentation claims you can write Blackberry code on any platform, the reality for a new developer is quite different. The Eclipse plugin they offer only runs on Windows. Very irritating considering I can run eclipse on my Mac as well as my Windows machine. Rather than fight it, I am going with the flow and using Windows XP 32bit inside my Parallels virtual machine.
Very important that you pay attention to the version of eclipse that the plugin works with. I didn’t and installed the lastest eclipse (3.5 as I write this). I went to “Help > install new software…” using “http://www.blackberry.com/go/eclipseUpdate”. I got the following error:
Cannot complete the install because one or more required items could not be found. Software being installed: BlackBerry JDE Plug-in for Eclipse 18.104.22.168 (net.rim.EclipseJDE.feature.group 22.214.171.124) Missing requirement: BlackBerry JDE Plug-in for Eclipse 126.96.36.199 (net.rim.EclipseJDE.feature.group 188.8.131.52) requires 'org.eclipse.debug.ui [3.4.0,3.5.0)' but it could not be found
I had to download the gannymede 3.4.2 version of eclipse and install it. Then I did the software update using the http://www.blackberry.com/go/eclipseUpdate URL. It prompted me half a dozen times for my Blackberry Developer zone ID. I dutifully entered it each time (annoying). After this, I had a working environment.
In the BlackBerry JDE Plug-in for Eclipse Installation and Configuration demo video, They show configuring the BlackBerry workspace. Well, this option is not enabled until you created a BlackBerry project. Also in this video, you will see them run the simulator just by clicking run. This did not work for me. In order to actually launch the application in the simulator, you need to right click the project and select “Activate for Blackberry”. If you don’t do this, Eclipse will launch the simulator and you will see debug output, but your project will not show up on the device.
The next step is to get it working on an actual BlackBerry device. When I first attempted this, it would not work with my old version of parallels. I updated to the latest build of parallels and then Windows could recognize the USB device. My mac took control and parallels did not prompt me like it usually does when I connect a USB device. There is an icon in the lower right of the frame. Click the USB icon there and select “Research in Motion”
I haven’t been able to get the Eclipse IDE to install and run the application on my device. I’ve had to use the tool JavaLoader.exe which is located in the bin directory of your JDE installation.
JavaLoader.exe -usb load HelloWorld.jad JavaLoader.exe -usb erase -f HelloWorld.jad
These commands will install and remove your application. This assumes that the bin directory is in your path and you are in the location where your *.jad and *.cod file.