05-07-2010 11:25 AM
I'm looking to use certain features of the 5.0 OS such as the transition API. Is there any way to have one codebase that will compile in different versions of the JDE but exclude certain blocks of code if the OS doesn't meet the requirements?
For example, the transitions would appear on a 5.0 OS device but not on a 4.5 OS device.
Ideally, I am looking for a solution that would integrate directly with Eclipse and debug without any additional steps in both versions of the OS.
Solved! Go to Solution.
05-07-2010 01:16 PM
Try doing some research on "preprocessor directives", you can use this to do what you need.
Basically, you wrap the 5.0 OS code in directives such as :
System.out.println("this compiles for 5.0");
System.out.println("this compiles for non 5.0");
Then you activate or deactivate the directives in the compiler to build COD versions for each platform.