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: 59
Registered: ‎07-01-2009
My Device: Android HTC One X
My Carrier: Cellcom
Accepted Solution

After RAPC - JAD refers to several CODs. Only 1 COD was created

I'm running the following RAPC ant task on my project:

<target name="rapc" description="RIM COD Compiler" depends="D_Package">

 

<echo message="Compiling for BlackBerry"/>

  

<exec dir="${final.dir}" executable="${bb.home}/bin/rapc.exe">

<arg line=" import=${bb.home}/lib/net_rim_api.jar "/>

<arg line=" codename=${MIDletSuite} "/>

<arg line=" ${final.dir}/${MIDletSuite}.jad "/>

<arg line=" ${final.dir}/${MIDletSuite}.jar "/>

<arg line=" -quiet "/> </exec>

 

This results in the creation of (among other files) 1 COD file. But the final JAD refers to several CODs:

RIM-COD-URL-5: skiller-5.cod
RIM-COD-URL-4: skiller-4.cod
RIM-COD-URL-3: skiller-3.cod
RIM-COD-URL-2: skiller-2.cod
RIM-COD-URL-1: skiller-1.cod

 

Which prevents the app from being downloaded via OTA, since the device can't find the COD files. What did I miss?

 

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: After RAPC - JAD refers to several CODs. Only 1 COD was created

[ Edited ]

Rename your one cod file to *.zip file.

 

Extract it.

 

Delete zip file.

 

Enjoy :smileyhappy:

If a cod file is bigger than 64 KB it has been composed as a zip-container of sibling cod files.
All siblings are specified in JAD and you do not need to touch JAD file.
Just rename big one cod file to zip and unzip it.
After that delete zip file.
Now you can deploy jad file and set of cod files via OTA.
Message Edited by tbilisoft on 14-07-2009 11:13 AM
Developer
Posts: 59
Registered: ‎07-01-2009
My Device: Android HTC One X
My Carrier: Cellcom

Re: After RAPC - JAD refers to several CODs. Only 1 COD was created

Working - many thanks.

 

B.T.W for future references:

The MIME types should be set correctly on the server:

cod      application/vnd.rim.cod
jad     text/vnd.sun.j2me.app-descriptor

Developer
Posts: 5,339
Registered: ‎09-20-2008
My Device: ***
My Carrier: ***

Re: After RAPC - JAD refers to several CODs. Only 1 COD was created

Developer
Posts: 43
Registered: ‎10-03-2008
My Device: Not Specified

Re: After RAPC - JAD refers to several CODs. Only 1 COD was created

The unzipping method works, but it's a pain in the **bleep** to have to do every time, especially if you're compiling multiple versions for different phones just about daily. Is there no way to fix either eclipse or rapc to either not zip them together, or automatically unzip them?
Developer
Posts: 59
Registered: ‎07-01-2009
My Device: Android HTC One X
My Carrier: Cellcom

Re: After RAPC - JAD refers to several CODs. Only 1 COD was created

I recommend using bb-andt-tools to do that. The JADTOOL task updates the JAD with the necessary properties and unzips the COD files in case they're archived. You can also turn to ANT's RENAME and UNZIP tasks.