4

I am using Eclipse to develop a BlackBerry app for BBOS 6.0. I now want to support BBOS 5.0 instead of 6.0. How do I do this?

Michael Donohue
  • 11,606
  • 5
  • 29
  • 44
Hasmukh
  • 4,396
  • 2
  • 25
  • 44

2 Answers2

4

You can develop using just one eclipse, not two (each for a OS version). And switch the compilation target in it. To do so, you should click properties of JRE System Library on your project and add alternate blackberry JRE through Installed JREs - Add and point to a folder inside your other installed blackberry JDE.

Then you can switch OS5 and OS6 from Properties for JRE System Library window in two clicks.

As for using OS6-specific classes and concepts, you should consider using #preprocess and #ifdef BlackBerrySDK6.0.0 for your code to compile in both 5.0 and 6.0.

Andrey Regentov
  • 3,499
  • 3
  • 27
  • 39
1

The First thing you have to do is to install the jde version 5.0. And compile your code with version5.0 Jde. It will run fine if you haven't used the Updated API or some class which have been added into version 6.0 and later. Like Menuitem i haven't used it so i dont have clear idea what are the classes is added in Version6.0 you can compare it from the doc. one refrence i am attaching here see the MenuItemconstructor its for 6.0 and this one for 5.0 compare the constructor of the both.

BBdev
  • 4,722
  • 2
  • 29
  • 44
  • Thanx for Replay.i had install jde version 5.0. i and also made some code for testing it will run. – Hasmukh Nov 09 '11 at 07:22
  • it will run if you dont use any classes which is added into version6.0 or later otherwise it will work fine – BBdev Nov 09 '11 at 07:31
  • i had created one menu class and this class i am inherits to all other class so is it work? – Hasmukh Nov 09 '11 at 08:03
  • can you tell me which constructor you have called..if the constructor you have called `MenuItem(StringProvider text, int ordinal, int priority)` ... it wont work on jde 5.0 else it work – BBdev Nov 09 '11 at 08:26