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

Testing and Deployment

Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi
Accepted Solution

Testing a PhoneGap App on Simulator

[ Edited ]

I've built an application in DreamWeaver and packaged it into a .Jad file using the built in Phonegap option. 


I tried putting the .jad file on the web and browsing to the url with the simulator, with no luck. 


How can I simulate the .jad file on my computer?




I found a web posting discussing the issue at http://stackoverflow.com/questions/766870/blackberry-run-a-jad-file-on-the-simulator


According to the website browsing to the jad location in the simulator's browser should do the trick. When I go to the location the .jad file downloads and I get a message saying "unable to find default app".

co-founder of Diaree | BB Dev for PictureThis
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Testing a PhoneGap App on Simulator

Hi there,


Please note that the JAD file is just a text / descriptor file that says where to get the COD files. The JAD and COD must both be hosted on your web server / file system in order to install the application.


There are two key points though:


  1. When an application exceeds a certain file size, it is actually broken into multiple, sibling COD files. Those COD files are then packaged into a ZIP, and finally the ZIP renamed to a COD. When distributing an application via JAD, you must unpack the archive into its sibilng COD files and host those instead of the full COD archive. The easiest way to check this is to try opening the COD file with an archive program (i.e. WinRAR). If you get an error, the COD is a COD and can be hosted as is. If you can see contents inside the COD (i.e. the sibling COD files), then you should extract those sibling files and host those along with your JAD file.
  2. The JAD will point at the COD file (relative to the JAD). You can open the JAD file with a text editor and verify the RIM-COD-URL attribute(s) to see where the COD files need to be placed (in relation to the JAD file.) Most of the time (unless you've made specific changes), the JAD and COD file(s) will need to be placed within the same folder.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.