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.
04-17-2010 08:27 AM - edited 04-17-2010 08:28 AM
i am using JDOM to manipulate an xml file into a blackberry application :
this is the code :
Callback = new TreeCallback();
tree=new TreeField(Callback, TreeField.FOCUSABLE);
SAXBuilder parser = new SAXBuilder();
org.jdom.Document doc = parser.build("data.xml");
Element node = docu.getChild("outline");
//On crée un Iterator sur notre liste
Iterator i = entries.iterator();
//On recrée l'Element courant à chaque tour de boucle afin de
//pouvoir utiliser les méthodes propres aux Element comme :
//selectionner un noeud fils, modifier du texte, etc...
Element courant = (Element)i.next();
Attribute type= courant.getAttribute("type");
Attribute label= courant.getAttribute("label");
int node1 = tree.addChildNode(0, label.getValue());
while(i.hasNext() && type.getValue()=="namedelementlink")
int node2=tree.addChildNode(node1, label.getValue());
That's whay i put this loop to read just some nodes ? when i run my project i have this exception :
Error Starting :Module Jdom not found ,but i have added the JDOM.jar in the class path
in your opinion what's the problem for me????
can any oen help me ?
04-17-2010 09:06 AM
You added JDOM to your class path so it would compile but JDOM doesn't exist on the BlackBerry so you get the error it can't be found.
Look up how to add a 3rd party library to your BlackBerry, that should fix it.
04-17-2010 09:32 AM
Thank you very much for repling ;
Can you tell what do you mean by adding a 3rd party library to my BlackBerry,i don't find any source to start .
can you explain to me ??
thank in advance ;
04-17-2010 04:42 PM
The library jar must be compiled as a COD and added to your JAD file (for OTA download). If you are installing on the phone manually, then the library COD will also need to be loaded using javaloader.
If you search the forum for "library cod" you will find many discussions.
Here is one: