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.

Posts: 108
Registered: ‎08-05-2008
My Device: Not Specified

How to distribute the application wirelessly?

Hello.  Using JDE 4.5, I am thouroughly confused as to how to distribute the application wirelessly over the internet. 

I wrote an equivalent of a Hello World app to see how it's done, but having trouble actually installing it.


I dropped .jad and .jar of my application on a web server (as was mentioned in several posts).  I pointed the browser to the .jar file and it started downloading.  Then it failed, saying "907 Invalid JAR Descriptor missing required attribute MIDlet-1". 


I tried rebuilding the app, but the error would not go away.


So my questions are as follows:


1.  What files do I need to place on the web server?  .jad, .jar, .alx???

2.  Which file do I point my users to, e.g. http://www.blah.com/myapp.jad???

3.  Another warning that popped up before the error: "This application does not contain a signature.  It might not be a from a trusted source....".  How do I sign the application and avoid freaking out users with this warning?



Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: How to distribute the application wirelessly?

normally you use jad+cod to distribute blackberry applications.
also see:

to set the correct content type on your webserver see:
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
BlackBerry Development Advisor
Posts: 15,885
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: How to distribute the application wirelessly?

And here is a developer knowledge base article on the trusted source warning.


Support - Warning: This application does not contain a signature. It might not be from a trusted source
Article Number: DB-00556


Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Posts: 70
Registered: ‎08-18-2008
My Device: Not Specified

Re: How to distribute the application wirelessly?



Could I ask a few more questions on this?


So we put our .jad and .cod files in the same folder someplace on our webserver like:






Now for first time install, we just tell users to browse to www.mycompany.com/downloads/mymidlet.jad and the blackberry device will take care of installing the application for us? (cool).


Will the same work as nicely for updates? Say our midlet checks for updates like:


    1) Midlet starts up

    2) Midlet makes webservice request to our company to see if any updates exist.

    3) If update exists, ask user if they want to install updates, if so, just direct them to URL of new update location.


If that's how it goes, how does blackberry handle overwriting the older version? Are we supposed to put our new version somewhere new on our webserver, or just overwrite the original download location with the new version?


And if our midlet depends on other libraries? 


Lastly, do .alx files come into play at all via this sort of web update?



Posts: 21
Registered: ‎07-15-2008
My Device: Not Specified

Re: How to distribute the application wirelessly?

Yep, drop the jad and cod in a folder (and make the mime changes), send them to myapp.jad, and then the BB magically installs it for you (and uninstalls the previous via a confirmation prompt).


I'm not sure how it will handle the update thing though. A rather ghetto approach might be:


1) Get your application version, and the version that the website has. If different...

2) Pop up a dialog and ask the user if they want the newer version. If user says yes...

3) Send the blackberry browser to mysite.com/myapp.jad

4) They'll get another prompt from BB to confirm the uninstall / install.


Also, depending upon your application, it might need a restart after the uninstall and before the install.

Posts: 70
Registered: ‎08-18-2008
My Device: Not Specified

Re: How to distribute the application wirelessly?

[ Edited ]

Ok I tried it and it kind of works, for some reason JDE inserts all these strange .cod URLs in the .jad file like:


    RIM-COD-URL-9: myapp-9.cod
    RIM-COD-URL-8: myapp-8.cod
    RIM-COD-URL-7: myapp-7.cod
    RIM-COD-Module-Dependencies: net_rim_cldc,myLibrary1,myLibrary2,net_rim_bbapi_browser
    RIM-COD-URL-6: myapp-6.cod
    RIM-COD-URL-5: myapp-5.cod
    RIM-COD-URL-4: myapp-4.cod
    RIM-COD-URL-3: myapp-3.cod
    RIM-COD-URL-2: myapp-2.cod
    RIM-COD-URL-1: myapp-1.cod
    RIM-COD-URL: myapp.cod


I have to delete them all except the last one, then it picks it up ok. Weird.


The bigger question for me now is this line with the dependencies:


    RIM-COD-Module-Dependencies: net_rim_cldc,myLibrary1,myLibrary2,net_rim_bbapi_browser


I made two external library projects named myLibrary1 and myLibrary2. The phone just quits downloading my main application because I don't have those two libs previously installed. Is there anyway to automate that through the main application .jad file? I probably can't tell users to first download myLibrary1.jad, then myLibrary2.jad, then myapp.jad. Is this what .alx files are for? Can they be used over the web?




Message Edited by markww on 08-26-2008 06:33 PM
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to distribute the application wirelessly?

I think you will find that all these points are explained in the Chapter "Packaging and distributing BlackBerry Java Applications" of the Development Guide.


I've referenced a couple of other places that you might find useful information.


This thread might tell you a little more about the cods with the funny numbers:



You can add your two Library cods to your application jad and download everything at once, the following link explains what you need to change to do so manually (see page 3):




Posts: 70
Registered: ‎08-18-2008
My Device: Not Specified

Re: How to distribute the application wirelessly?

Peter, thanks a lot, that showed me exactly how to get it working,