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?
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 useorg.json.me.JSONArray
,org.json.me.JSONObject
.... you just useorg.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"
You have compiled your application with SDK 6.0 and are trying to launch it on device with SDK 5.0
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.
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