JDE itself doesn't support antenna preprocessor syntax, but you can do in next way:
//# public static final boolean isOS42 = true;
public static final boolean isOS42 = false;
Notice that one of the source lines is commented with "//#" and is not parsed by IDE, so it doesn't show error here. But antenna knows such syntax and removes "//#" during preprocessor stage.
In general I agree with Richard - use interfaces and different implementations, where possible.
But sometimes it is not possible, so we need to do such tricks.