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
New Developer
Posts: 35
Registered: ‎09-11-2008
My Device: Not Specified

Importing 3rd party JAR files into my MIDlet suite - need help ASAP

All, I've created a PushRegistry MIDlet that works just fine. However, because of architectural reasons, I have broken it up in such a way that part of it is now a JAR file. The other part of the MIDlet code is the actual MIDlet itself and the JAR file has some utility/helper classes. I've imported this into my MIDlet using Eclipse. It compiles fine. I also included my JAR file on the BlackBerry RAPC command line in the "import" flag. This works fine as well. However, when I try to load this onto my BlackBerry 8300, I get a, "The application"test" cannot be loaded because some required files are not available". What is the problem? I've looked high and low and can't seem to figure it out. I don't have any "vendor.xml" file either. Any and all help would be GREATLY appreciated. I have a deadline here. Thanks.

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Importing 3rd party JAR files into my MIDlet suite - need help ASAP

I just just got done testing a similar thing using all my own code and scripts and it seems to work in that

the one app can find the other app class defs, at least if compiled as a library I haven't tried it as a jar file.

 

Take a look at the jad file for anything you need but isn't likely resident on your phone.

AFAIK, your loader can only complain about things it finds here in your jad file,

RIM-COD-Module-Dependencies: net_rim_cldc,net_rim_bb_browser_field_api,XXX610_10_0_4545,net_rim_os,net_rim_locationapi,net_rim_bbapi_mailv2,net_rim_xml

If you can identify your library in a line like the above, I think ( someone correct me on details if wrong as I'm making up parts of this LOL) you can convert your jar into a cod and load it before attempting to load your target app. I did note that omitting the "-library" flag would still create a cod file but then you get a no class def problem invoking your target app ( which still compiles as the compiler doesn't know what is discoverable on your target phone).

 

 

 

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Importing 3rd party JAR files into my MIDlet suite - need help ASAP

Hi,

If you are sure the JAR and JAD which you have is working fine on any mobile device, keep the same JAR and JAD on a web server and try downloading on BB directly.

 

Tnx.


Use Search. "Accept Solution" If the problem is resolved.