05-04-2010 10:36 AM
Have now reached the point where more than one level has to be maintained due to differences in the API:s. So I have one for 4.5 and one for 5.0. I have been using Eclipse for 5.0 and Blackberry for 4.5.
So far it has worked with the same source but no longer. It seems that the natural choice is to use Eclipse only and use compiler directives in the source. Eclipse can have several versions of the API installed. Maybe Blackberry can too, but I have not seen that. Not sure how to best accomplish this. Is it to switch target library for generated code and link libraries when switching between the two? How do I make the compiler to understand what version I am compiling?
05-04-2010 10:43 AM
05-04-2010 06:02 PM
>use this as a keyword and you should find numerous posts
Thats for sure. Does it really help vading thru all these? Got tired after approx 5 of them.People having all kinds of strange problems. So I decided to try documentation.
Help in Eclipse
You can specify preprocessor directives for a single project or for all projects in a workspace. You must enable preprocessing in Eclipse® before you can specify preprocessor directives. For more information about how to enable preprocessing, see the BlackBerry Java Plug-in Installation and Configuration Guide.
Search the web.
Found a Configuration guide:
Not bad. Tells me to add "osgi.framework.extensions=net.rim.ejde" to the eclipse ini file. Did that.
Next. Specify for all projects in a workspace. Not mentioned how to do that in this document.
More searching. Found this:
Nice pic showing where to specify the preprocessor statement. The lead says:
BlackBerry Project Properties, Preprocessor defines. Not correct. A bit different on my Eclipse, had to navigate one step further but finally found where to specify the preprocessor define.
Still wonder how I specfy it for the complete workspace. Have not found that
So. it took me more than one hour to find it. How about a simple "How to" ?
So I fix my source code preprocessor statements in the source.
And if I understand it correctly I have to do 3 different things before compling when changing between different levels.
- change the preprocessor define
- change what jre library to use
- change what output library to place the result in
05-05-2010 03:01 AM
05-05-2010 03:36 AM
In the documentation I have found nothing is mentioned about adding this statement in the jdp file. Is that a general requirement or is it needed only for some specific versions of the jde? What you explain only handles the differences in the source.
How do you handle the need for different levels of import libraries and different output libraries? Or do you use different separate jde installations for the different versions and copy the source code between them?
05-05-2010 03:47 AM
05-05-2010 05:46 AM
Lets hope someone do respond :-)
That implies that I can use the most modern jde but import backlevel libraries. Hadnt thought of that but its logical. Solves another problem I have. The 4.5 jde do not support "enable device security" on the simulator (or the feature is somewhere else than on 4.7)