Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified

Error : The type Class is not generic; it cannot be parameterized with arguments <T>

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.

 

 

Developer
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: Error : The type Class is not generic; it cannot be parameterized with arguments <T>

BlackBerry/J2ME does not support enum and generics.
New Developer
Posts: 22
Registered: ‎07-17-2008
My Device: Not Specified

Re: Error : The type Class is not generic; it cannot be parameterized with arguments <T>

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.

 

 

Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified

Re: Error : The type Class is not generic; it cannot be parameterized with arguments <T>

Thanks for the replies.

Now even I think I should stick to the standard way of declaring constants :smileysad: 

Developer
Posts: 1,415
Registered: ‎07-30-2008
My Device: Not Specified

Re: Error : The type Class is not generic; it cannot be parameterized with arguments <T>

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.

 

Developer
Posts: 211
Registered: ‎04-29-2009
My Device: Not Specified

Re: Error : The type Class is not generic; it cannot be parameterized with arguments <T>

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.