Reputation: 329
I have built a Blackberry for simulator 9900 (BlackBerry 7 OS), and want to run it on BlackBerry device which have BlackBerry 6 OS. So if any body have idea how to do it, please provide the solution.
Upvotes: 0
Views: 303
Reputation: 2650
Running applications compiled for a later version of the OS on an earlier version is not supported. Typically this will fail when you attempt to run it because there are API's missing, but even if the application only uses APIs that are available in both levels, it is not supported.
So your only option is the install the OS 6 level of the JRE in your Eclipse, change the project to use that for compilation and build a version using the OS 6 JRE. This build will then run on both OS 6 and OS 7.
If you have used OS 7 level only APIs and these are essential to your app so you wish to retain them in the OS 7 version (obviously you can't use them in OS 6), then you will need to find some way to build the OS 7 and OS 6 versions separately, and not use the OS 7 APIs in your OS 6 build. The easiest approach that I am aware of is to use the pre-processor. But other people have developed other approaches depending on how they have automated the build.
You might be asking a different question, which is, how do you actually target a different Simulator? To do this, look at your Run or Debug configuration (under the Run menu item) and select the Simulator tab, That will enable you to choose another Simulator. The OS 6 JRE comes with some Simulators and you can download more:
http://us.blackberry.com/sites/developers/resources/simulators.html
Or you might be asking how to put the application on a device in general? There are a number of options to do this, as explained on this page:
http://developer.blackberry.com/bbos/java/documentation/package_distribute_apps_2006593_11.html
Upvotes: 2