11-15-2010 05:50 AM
First of all my configuration :
- Eclipse 3.5
- JDE plugin por eclipse version : 188.8.131.52004161203-16
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
11-15-2010 07:29 AM - edited 11-15-2010 07:30 AM
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!
11-15-2010 11:33 AM
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.
11-17-2010 04:06 PM
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.