Sunday, August 2, 2009

How to Add jar file in Blackberry

Something it is required to add third party application jar in your blackberry application.
For example you want to use KXML Parser to parse XML in your application.

Then go through the steps below to add the kxml jar to your application:
1.Preverify your jar file (just in case if it is not preverified). Follow the steps below for preverifying:
   a. Go to your JDE installation folder (C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin)
   b. Copy the jar file to bin folder.
   c. Now open your command prompt and change your current directory to your JDE installation directory.
   d. 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"

   e. In your bin directory(C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin) a folder named output will create.
   f. Preverified jar file resides here.

2.Now Add the preverified jar file to your project like normal java file (Right Click on the project -> All File to    Project...).
   If it not works with just adding then you have to add the jar as a library project.

No comments:

Post a Comment