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
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

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
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

Re: Import JAR Libraries

I get a different error now

error.gif

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

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
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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
christopherbecker
Posts: 28
Registered: ‎11-13-2012
My Device: none

Re: Import JAR Libraries

[ Edited ]

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

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

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