I am making an application for blackberries and wanted to make use of touch capabilities on touch capable phones. Is there a way to do this without making two separate projects (like I would in c with preprocessors that check the compiler)?

An idea of what I'm trying to do would be like(if it were in C):

#ifdef RIM_JRE_5.0
//some touch sensitive code
#endif
#ifdef RIM_JRE_4.3
//some plain old buttons code
#endif

I was able to find something like this here:http://www.slashdev.ca/javapp/ but I was wondering if there was a way to do it natively
and I'm not sure if that project is able to detect the jre

Seems that since version 4.0 rapc natively supports, weird that it didn't come up on any searches, I only found it through the bb-ant-tools docs (http://bb-ant-tools.sourceforge.net/docs#preproc). Maybe because I was searching for a preprocessor for a jre and not specifically rapc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.