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

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: 16,992
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: 16,992
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: 16,992
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?

Highlighted
Developer
Posts: 16,992
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