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.

New Developer
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

RIMAPPSA2 problem with library

hi everyone


First of all my configuration :


- Eclipse 3.5

- JDE plugin por eclipse version :


Ive devepoled a library and it works in the emulator, I mean, I can call methods in a proper way by importing the jar, what I consider as incredible because Ive been working on that process a lot of time (when you would have just to import a jar and use it in your build path but.....

Ok blackberry library is ok and I can use it in the simulator (9550 in these moments), the problem is, when I deploy an app to the device.

First of all, with the same configuration Im using at  simulator, it does not work because it tells me "module XXX not found" and its just weird because IT WORKS in the emulator.

Ok, I export the "module" a.k.a library and I can see into the signing process : "RIMAPPSA2" failed to sign (with no chance of sign it correctly) and when I start the application, I see "There is no chance to invoque native", exactly I get :

"Error starting : appsample1: 'appsample1' may not call a native method"


So, Ive read all this week end about RIMAPPSA2 and to check if I use net.rim.vm, I dont use this import and nothing weird; I use things like camera, contacts, etc,. I mean, Ive got a library to simplify the development of a blackberry application, its kind of a framework, but Im not able to create a simple app to run in the device.


Ah, I forgot to tell yes, Ive preverified the library like 10 times to be sure it is with :


preverify -classpath  "..\lib\net_rim_api.jar " mylibrary.jar and take the one from the output


Ive see people who posts things like :


preverify -verbose -d . -classpath ..\lib\net_rim_api.jar <Path to jar file>\<jar file>


(please are there differences between how to make a preverification?)


I really need this to work because I need to share this jar with developers to develop blackberry apps, please, could you help me?



Thx in advance, kind regards

New Developer
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: RIMAPPSA2 problem with library

[ Edited ]

Hi again



Maybe Ive got an improvement into my research with libraries; Ive installed the library out of the app, and the problem rightnow is the next one (I use the jad jar generated from eclipse, take that jar and jad to preverify the jar and then using rapc to generate the cod file to install it into my device, blackberry storm) :


"Error starting sampleapp1 : Module 'sampleapp1' cannot depend on non-library 'myLib'."


And Im sure the app myLib is a library; Ive deleted too the sentence from the manifest who gaves error

with a library; so,  can anyone tell me what Im doing wrong?


When Im trying to delete de myLib I cant find it into the installed applications so, where is the problem?

I think Im near of fix this problem up, please help!




New Developer
Posts: 44
Registered: ‎08-11-2008
My Device: Not Specified

Re: RIMAPPSA2 problem with library

Hi everyone



Ive fixed some problems but there is no the way I would really like....; I can use almost any library but I would like to make it with not including the code just the jar; if you debug an application with the project library as a target marked too in "debug configurations..." in eclipse, you are going to be able to use a library because your library is included into your project information; so is there a way to use it independently ? please no preverify, tutos or something like that , just real help Ive read everything about blackberry libraries, preverify, javaloader, bb_ant_tools,etc,. etc,. etc,.  with no success with this point.




BlackBerry Development Advisor
Posts: 15,884
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: RIMAPPSA2 problem with library

Note that you are not able to take the JAR file created by the BlackBerry Java Plug-in for Eclipse or BlackBerry JDE and use it in another BlackBerry project without also supplying the COD file from the original library project.


This is because the JAR file created only contains method stubs.  It doesn't include any real byte code.  This allows developers to build off this library (imports are valid).  They will need to install the library COD file you supply them on the BlackBerry Smartphone along with their application.


This allows you to have control over the distribution of your library.  You can protect your library with your own custom, code signing key.  This means whatever application that tries to reference your COD file must be signed with this key.  Since you control who has access to your key, you control who can use your library.  The BlackBerry Signing Authority tool is used to generate and issue these custom keys.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.