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
Highlighted
Contributor
Posts: 40
Registered: ‎10-10-2011
My Device: BB Curve&Bold
My Carrier: Airtel
Accepted Solution

How to add JSON.jar file in bb OS 4.5?

Hi All,

 

I have a problem in parsing a json file in BlackBerry os 4.5 and 5.0.I have added the JSON.jar  file in my project.I am trying to run that project it throws "Uncaught Exception:java.lnag.NoClassDefFound Error".I think jar file is not working properly.How to solve this problem?

 

 

Thanks,

Developer
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: How to add JSON.jar file in bb OS 4.5?

Download json for j2me code zip file from url:

 

http://www.megaupload.com/?d=QDW9N225

 

and copy all the files into your application source.

Contributor
Posts: 40
Registered: ‎10-10-2011
My Device: BB Curve&Bold
My Carrier: Airtel

Re: How to add JSON.jar file in bb OS 4.5?

[ Edited ]

Hi ,

Thanks for your relpy.Already i have downloaded tha JSON.Jar file and i have added the Jar file to project.But my problem is that jar file is not working properly. i am trying to parse the Json file it throws "NoClassDefFound Error".

How to solve this?

Developer
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: How to add JSON.jar file in bb OS 4.5?

because you have downloaded jar file which is supported to j2se not j2me, so it this classDefnot found error is thrown.

Contributor
Posts: 40
Registered: ‎10-10-2011
My Device: BB Curve&Bold
My Carrier: Airtel

Re: How to add JSON.jar file in bb OS 4.5?

[ Edited ]
Hi,
I have downloaded the same org.json.me jar file.
http://www.megaupload.com/?d=QDW9N225 this link there is no jar file.It is a .zip file extension and extract this one source code is there,not jar file.
Developer
Posts: 208
Registered: ‎08-04-2009
My Device: Not Specified

Re: How to add JSON.jar file in bb OS 4.5?

yes, add org folder to your application source.

Contributor
Posts: 40
Registered: ‎10-10-2011
My Device: BB Curve&Bold
My Carrier: Airtel

Re: How to add JSON.jar file in bb OS 4.5?

Thanks for your reply.Now it is working fine, i added the org folder in my source code.

 

Thanks a lot.