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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


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.
Highlighted
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 Smiley Sad 

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.