Blackberry – Issue with Installing to a device using Javaloader

After I successfully finished developing the first part of my new Blackberry application, I code-signed it so that I can see it on an actual device. There are many ways to deploy your under-development application to the device. You can directly use the “Debug” menu in eclipse and select Debug As -> Blackberry Device. With your device connected to the USB port, eclipse will automatically deploy your application. Behind the scenes eclipse uses a command line tool called JavaLoader to deploy the application. Consequently, you can use “JavaLoader” directly from the command-line as well.

There are a few other ways as well. For instance, you can use the Blackberry desktop manager software to deploy ALX files, or you can deploy OTA using JAD files and so on. Although the last two methods are primarily used for the production deployment, the first two methods can be used for development deployment.

When I wanted to deploy using the first method for the first time, eclipse was showing a progress bar for too long with no feedback. I cancelled the operation and tried again with no change in attitude from eclipse. So, i decided to directly use JavaLoader. I used the command…

JavaLoader.exe -u load path_toyour_app.cod

and got the error…

Connecting to device...debug: HRESULT error during Open: 80040154
Error: unable to open port

My excitement wained off for the moment. Won’t it be good if everything worked well at first attempt?

 

Solution:


Install the Blackberry Desktop Manager. When you connect your blackberry using the USB cable, make sure the desktop manager says it is connected. Then you can use javaloader to load the app into your mobile without the command-line error or without Eclipse showing attitude.

NOTE: I am wondering why wouldn’t it open the app by default when i deploy it. Why do I have to browse through the application list or the download directory and run the application by myself.

Install Blackberry SDK 6.0 to your existing Eclipse Helios

Blackberry provides a “Java plugin for Eclipse” that can be downloaded and used for eclipse-based blackberry development. But beware, what you download is not an eclipse plugin. Instead, it is a full eclipse download with the plugins pre-installed. I didn’t want a new copy of eclipse just for Blackberry development. I wanted to use my already well configured Helios installation to be used for Blackberry development as well. So, i chose to use the provided update site – http://www.blackberry.com/go/eclipseUpdate/3.6/java – to install the plugin to my existing Helios installation.

The issue is that, I was unable to install the plugin using the aforementioned update site and noticed that others faced the same problem too. After a lot of failed attempts, I finally discovered a different way to solve the problem. I downloaded the full “Java Plugin for Eclipse” from the Blackberry download site and just copied all the net.rim.* files from the plugins and features directory to my Helios installation.

Worked for me and I am a happy camper!