Tutorials Blackberry Importing kxml jar File to Blackberry Project ?

Importing kxml jar File to Blackberry Project ?

This is my first technical write-up towards BlackBerry. I’ve been working on BlackBerry application development for the last couple of months and faced a number of issues while porting the MIDP application, some of whose solutions were not easy to find out and required more effort and time than anticipated.

I had difficult time in XML parsing with BlackBerry API. Here came the great kXML parser. I downloaded the jar file.

Importing a jar file to my project in JDE at first seemed an easy task. A little bit search led to my project’s Properties -> Build and then Add to imported jar files. But this procedure failed miserably and showed –

Module ‘kxml2-2.3.0’ not found.Error starting kXmlParserTest: Module ‘kxml2-2.3.0’ not found.

Again I resorted to googling and someone at one of BlackBerry developer forums wrote that this problem occurs due to incompatible binary structure of jar file and suggested a solution for preverify the kXML jar file.

1. Go to your JDE installation folder, for Windows XP it is usually C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin

2. Copy the kXML jar file to bin folder.

3. Notice the preverify.exe file. This is the tool we’ll use.

4. Now open your command prompt and change your current directory to your JDE installation directory.

5. execute the following command:

preverify -classpath “C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\lib\net_rim_api.jar” “your_kXML_jar_filename”

6. Notice that in C:\Program Files\Research In Motion\BlackBerry JDE 4.3.0\bin directory, another folder named output has been created. Preverified jar file resides here. Copy the preverified jar file with the same name that the non-preverified jar file has.

7. Now replace the non-preverified jar file with the verified one. Remove the former from your kXmlProject and add the latter.

Then the project build was successful and this project was going to be used as a library for my other project, say kXmlParserTestProject.

I tried to build kXmlParserTestProject but project build failed. Then was the time for fixing project dependencies.

– Go to kXmlParserTestProjec’s Project Dependencies and check kXmlProject.

Now everything working fine.

Newest Most Voted
Inline Feedbacks
View all comments
12 years ago

Excellent Post

10 years ago
Reply to  Anonymous

thank you..

10 years ago

Thank you.. You can also visit below links for Garbage collections and algorithms used.


10 years ago

Hey CCS, Thanks for visiting my blog.. I was wondering, if you can share some of your work samples, app review or your project experience to share on my blog.

Prashant Koli
Prashant Koli
9 years ago

im working on Facebook integration into Blackberry i have Facebook-blackberry-SDk and also having Log 4B jar files im done all these step whatever u said but still i get an exception NocalssDefFound error..

Previous Post

How to execute J2ME Application from a batch File ?

Next Post
Game Development

Introduction to Game Artificial Intelligence

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All