Hilton,
There's a post on the BlackBerry Support forums that addresses this, but here's a summary. Thanks to Jeremey Weber for this information.
The preprocessor is available in all versions of the JDE.
Edit the .jdp file manually
Find the Options line
Add ‘–define <tag1>;<tag2>;…;<tagN>
e.g.: Options=-quiet-define= VER_4_2_0_AND_ABOVE;PREPROCESSOR
Note: The –define statement is an argument passed to rapc
Add directives as follows:
Code:
//#preprocess
public class Library implements LibraryInterface {
public MenuItem[] getMenus() {
MenuItem[] menuItems = null;
//#ifdef VER_4_2_0_AND_ABOVE
menuItems = new MenuItem[] { new InvokeAB(), InvokeMaps() };
//#else
menuItems = new MenuItem[] { new InvokeAB() };
//#endif
return menuItems;
}
}
Apparently the //#preprocess statement needs to be the first line in the source file.
fbrimm