java me - Blackberry Multiple OS version compatibility issue -
i have developed chat application on blackberry os 5.0 client wants me make portable platforms 4.5 5.0 , above. have tried using preprocessor directives compile os compatible classes @ run time, haven't succeeded in yet. doubt way i'm using preprocessors. i'm putting example here:
//#ifdef jde_4_6_0_and_above /* //#endif //some code //#ifdef jde_4_6_0_and_above */ //#endif //#ifndef jde_4_6_0_and_above /* //#endif //alternative of code used above //#ifndef jde_4_6_0_and_above */ //#endif
this way i'm doing particular part of code. logic here use first code if os version 4.6 , above...and use second code if os version below 4.6....
but code under preprocessors doesn't seem compile in either of case.
note: have put "//#preprocess" @ start of code , defined preprocessors in application descriptor xml file, still no luck. there other solution handling compatibility between bbos versions?
you placing code outside statements. ifdef , ifndef open statements, endif closes statement. can use #else have 2 cases.
//#ifdef jde_4_6_0_and_above system.out.println("jde_4_6_0_and_above"); //#else system.out.println("not jde_4_6_0_and_above"); //#endif
cheers
ray
Comments
Post a Comment