Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


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.


Reply
Contributor
Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

Import JAR Libraries

How would one mark a library as export, or install separately as a COD?

I am using the RESTY.JAR and when I launch my app, I get this error,

Untitled-2.jpg

 

The JAR file is correctly included:

jars.PNG

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Import JAR Libraries

in project properties, go to "java build path" and select the tab "order and export", select the checkmark for the library.

if this does not work there are other options, but it should.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

Re: Import JAR Libraries

I get a different error now

error.gif

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Import JAR Libraries

preverify it:
http://docs.blackberry.com/en/developers/deliverables/11938/Preverify_a_BlackBerry_Java_Application_...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

Re: Import JAR Libraries

in the terminal i get this error

 

Error preverifying class us.monoid.json.CDL
java/lang/NoClassDefFoundError: java/lang/Object

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Import JAR Libraries

is the library a blackberry java lib?
the one i see at http://mvnrepository.com/artifact/us.monoid.web/resty/0.3.1 is a desktop java lib, you cannot use j2se on BB.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Contributor
Posts: 28
Registered: ‎11-13-2012
My Device: none
My Carrier: 27768965251

Re: Import JAR Libraries

[ Edited ]

oh for heavens sake, what others jars are there that work similar?

Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Import JAR Libraries

what do you want to do? use a json webservice?
its in the api since 6.0:
http://www.blackberry.com/developers/docs/7.1.0api/org/json/me/JSONObject.html
etc

here is the sample:
http://supportforums.blackberry.com/t5/Java-Development/Sample-Code-Implementing-JSON-in-your-applic...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter