Thursday, December 2, 2010

BlackBerry Debug

How to use jar file as a library (Preverify)
Try with the following approach.
a. Preverify your jar file (just in case if it is not preverified). Follow the steps below for preverifying:

1. Go to your JDE installation folder (C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin)

2. Copy the jar file to bin folder.

3. Now open your command prompt and change your current directory to your JDE installation directory.
4. Now execute the following command:
preverify -classpath "C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\lib\net_rim_api.jar" "your_jar_filename"
5. In your bin directory(C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin) a folder named output will create.

6. Preverified jar file resides here.
b. Add the preverified jar file to your project (like normal java file).
The above approach worked for me.
If by any chance this approach not work for you. Try with the following:

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compi...

http://supportforums.blackberry.com/t5/Java-Development/How-to-use-jar-file-as-a-library/td-p/242961

7 Check Log
Alt + LGLG


8. Reboot 
To reboot, simply hit ALTRIGHT SHIFT and DEL.


9. Blackberry app cannot be launched.
There may be multiple main functions in the project.


10. Not use proguard for BB.
I suggest you didn't use Proguard or any obfuscator to obfuscate your code before it goes to rapc, since rapc have it's own obfuscator, i usually use Proguard only for optimization not obfuscating

No comments:

Post a Comment