Welcome!

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

Reply
Developer
Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified
Accepted Solution

Getting OTA downloading of applications to work

Hi all,

 

I've created an application with the BlackBerry plug-in for Eclipse.  Both the cod files (several cod files zipped into one) and the jad file has been created.  However, once I sign the cod files with my developer's signature key, the size of the cod files are altered.  Doesn't this cause an issue when trying to host both the jad and cod files on a webserver?  The jad file has not been altered with the new sizes of the cod files.

 

I have been using this thread, http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=841, as a reference point to try and handle my cod and jad files appropriately.

 

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

Did you unzip the .cod file that is created by the compiler? This is a requirement for OTA. Copy the .cod file to a .zip file name and extract the individual .cod files.

 

 

 

Developer
Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

So on my webserver, I should have a bunch of cod files (MyApplication.cod, MyApplication-1.cod, MyApplication-2.cod, etc.) and one jad file?  Would I need to alter the jad file's parameters to take into account the new file sizes (due to the file size changes from signing the application/cod files)?  If this is the case, sounds like it'll be a pain every time I want to place the file on a web server since I'd have to manually change the sizes of the cod file in the jad file (these are all generated by the eclipse plug-in currently)

 

Also, I want to confirm that the MIME-types I should have for the web server is:

jad  - text/vnd.sun.j2me.app-descriptor

cod - application/vnd.rim.cod

 

 

[Sorry if these questions seem elementary.  I've been mainly loading my application onto my handset via the command line javaloader command...this is terra incognito for me]

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

I have never touched a JAD file post-compile. I unzip the COD's and post them along with the JAD.

 

Your mime types look correct.

 

Developer
Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

I've unzipped the cod/zip file and placed all of the cod files into the same directory as the jad file.  I've also verified that the two MIME types are in.  However, when I try to access the jad file from my handset (through the BlackBerry Browser), i just see the jad as a text file.  Have I set it up correctly on the web server? If so, am I accessing it incorrectly from the handset?
Developer
Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

Update:  I've gotten a little farther with it now returning me an 500 HTTP error.  The details state:

 

Resource could not be found [webserver]/MyApplication-6.cod 404 Not Found.

 

The thing is, when I create the jad and cod file through the Eclipse plugin and view the jad file in notepad, it shows my Application having 7 cods:

 

MyApplication

MyApplication-1

MyApplication-2

MyApplication-3

MyApplication-4

MyApplication-5

MyApplication-6

 

However, when I open up the zip file, I only see 6 cod files:

 

MyApplication

MyApplication-1

MyApplication-2

MyApplication-3

MyApplication-4

MyApplication-5

 

Is the jad file being generated just completely bonkers?   I removed the entry for MyApplication-6 from the jad file and now it works correctly.  Any one else run into the same problem or can explain why my jad file is incorrectly?

 

Highlighted
Developer
Posts: 77
Registered: ‎11-20-2008
My Device: Not Specified

Re: Getting OTA downloading of applications to work

Second update:  I installed the latest version of the BlackBerry plug-in for Eclipse and rebuilt my cod and jad files.  Looks like the jad is generating properly without adding a mysterious reference to another cod file.

 

Just a refresher if anyone else stumbles upon the thread:

 

Make sure your MIME types include the jad, jar, and cod definitions.  I didn't have the jar definition initially so my jad file showed up as a text file.  Unzip the cod files in the one cod file and place all those files with your jad file onto a web server.  Voila. 

 

Thanks to all those that helped!