Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » "The type List is not generic" in Eclipse 3.1 RC4
"The type List is not generic" in Eclipse 3.1 RC4 [message #207925] Sun, 26 June 2005 00:51 Go to next message
Eclipse UserFriend
Originally posted by: anony_java.anon.foobar

My environment:
JDK 1.5.0_04
eclipse-SDK-3.1RC4-win32.zip
Windows XP


I have a Java class with the following method signature:

protected Bar createBar(List<Foo> fooData)

The Eclipse compiler flags the method as a compile error.

The error message is:

"The type List is not generic; it cannot be parameterized with arguments
<Foo>"


I checked my Workspace preferences and the Compiler's JDK Compliance
level is 5.0
Re: "The type List is not generic" in Eclipse 3.1 RC4 [message #207950 is a reply to message #207925] Sun, 26 June 2005 05:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: newsserver_mails.bodden.de

On Sat, 25 Jun 2005 21:51:02 -0700, Anony wrote:
> "The type List is not generic; it cannot be parameterized with arguments
> <Foo>"
Are you sure that in your setting "List" resolves to "java.util.List" ?

Eric

--
Eric Bodden, ICQ: 12656220, http://www.bodden.de, PGP: BB465582
Arithmetic Coding Revealed - a comprehensive guide to AC
http://bodden.de/studies/publications/pub_ac_en/
Re: "The type List is not generic" in Eclipse 3.1 RC4 [message #207989 is a reply to message #207950] Sun, 26 June 2005 19:51 Go to previous message
Eclipse UserFriend
Originally posted by: anony_java.anon.foobar

I found the root cause. The Java Build path for my project was wrong.

The Build path contained a reference to the J2SE 1.4.2 libraries.

Eric Bodden wrote:
> On Sat, 25 Jun 2005 21:51:02 -0700, Anony wrote:
>
>>"The type List is not generic; it cannot be parameterized with arguments
>><Foo>"
>
> Are you sure that in your setting "List" resolves to "java.util.List" ?
>
> Eric
>
Previous Topic:Repost: Original source element of working copy in ElementChangedListener
Next Topic:Navigating amoong the editor tabs using the keyboard
Goto Forum:
  


Current Time: Sat Aug 23 06:34:33 EDT 2025

Powered by FUDForum. Page generated in 0.03469 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top