4

I have created one application in j2me, I have used json parsing in that application. I can build it SUCCESSFULLY.

Parsing import: C:\Program Files\Research In Motion\BlackBerry JDE 6.0.0/lib/net_rim_api.jar(net_rim_json_org.cod)

BUILD SUCCESSFUL (total time: 1 minute 3 seconds)

But when imported application on blackberry 9000 v5.0, and trying to open it it showing

net_rim_json_org not found

My question is, it's showing that net_rim_api.jar (net_rim_json_org.cod) imported but when I am trying on device its showing error - why is this happening?

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44
Mr. Sajid Shaikh
  • 7,051
  • 4
  • 21
  • 35

3 Answers3

6

I also faced this problem and have managed to solve like as described below.

package org.json.me is built-in in JDE 6.0.0 but not in JDE 5.0.0 or below. So, you need to add that package yourself. You can download the package from github.

If you want to write the same code for both JDE 6 and JDE 5 and make your application work on both JDE 6 and JDE 5, then you can rename that package to something like org.json.whatever .... and in your code wherever you need to use org.json.me.JSONArray , org.json.me.JSONObject .... you just use org.json.whatever.JSONArray, org.json.whatever.JSONObject etc. Thus you can make your code JDE-version independent for JSON parsing.

More on json parsing in the SO question "Json parser for Blackberry OS 5"

Community
  • 1
  • 1
Tariq M Nasim
  • 1,278
  • 11
  • 24
2

You have compiled your application with SDK 6.0 and are trying to launch it on device with SDK 5.0

SDK version == JDE version you have used.

Error you get means that device OS ver. 5.0 does not have this library, that exists in device OS ver. 6.0

Note that, if you compile your app with SDK 6.0 it will run properly on devices with OS versions 6.0 and 7.0, but not on devices with OS 5.0 and older.

  • net_rim_json_org is available on BlackBerry JDE v5.0? – Mr. Sajid Shaikh Apr 04 '12 at 12:51
  • 2
    I do not have installed JDE 5.0 on my computer, if you do, then check simulator folder of JDE 5.0. If there is a file "net_rim_json_org.debug" exists, then this file exists on the device with OS 5.0 as "net_rim_json_org.cod". –  Apr 04 '12 at 12:58
0

In you build settings==> order and export, you are exporting that library or not. If not then please check the checkbox and your application works fine

Nsr
  • 219
  • 1
  • 11
  • i have used netbean, can you please explain your answer properly. – Mr. Sajid Shaikh Apr 04 '12 at 12:42
  • I am using eclipse, In Eclipse what I use to do that is....Right click on your project ==> Bulid Path ==> Configure Build Path ==> Order and Export, here your json library is showing, just checked the checkBox and save the settings. ......I doesn't know about netbeans might be it is same for that also. – Nsr Apr 04 '12 at 12:49
  • Go to its Properties -> Sources -> Compile tab and add all the JARs that you want to be included. – Nsr Apr 04 '12 at 13:01