05-08-2009 03:32 AM
Hi,
I am using Blackberry plugin for Eclipse.
To support enum keyword and generics , I have changed java compiler compliance level to 1.6
Now I am getting following error,which doesnt allow me to compile the file:
The type Class is not generic; it cannot be parameterized with arguments <T>
Please help.
05-08-2009 09:54 AM
05-08-2009 10:11 AM
Changing the compliance level in Eclipse is conceptually changing the JVM of the development environment. However, you are ultimately limited to the JVM of the deployment environment, which is the device. The JVM on the device is not upgradable for lots of reasons, which is why this kind of approach fails. You must stick with what RIM gives you.
05-09-2009 12:13 AM
Thanks for the replies.
Now even I think I should stick to the standard way of declaring constants
05-09-2009 07:55 AM
I've been using custom scripts/makefiles for my projects and routinely use the c++ preprocessor to let me
use all the normal macro and even include functions along with conditional compilation. If you just want
to declare constants, macro's may be a reasonable approach. I've finally started using things like __LINE__
in standard error handling now ( also note that there is not programmatic way to get a stack trace ).
The lines numbers are not consistent since javac doesn't know about preprocessor but I'm trying
to see what I can do with the options here.
05-09-2009 08:03 AM
Actually enums was best option for the application that I am developing.
However it was very sad to know I cant use it in Blackberry - j2me apps.
Also generics support is not there.Just like j2me.