类型集合不是通用的;它不能用参数<?延伸E> [英] The type Collection is not generic; it cannot be parameterized with arguments <? extends E>
问题描述
我设置Java 1.6作为我的JRE。在这行代码上
List templates = new ArrayList();
我在Eclipse的问题列表中看到以下错误:
类型集合不是通用的;不能使用参数参数化
我在Ant中构建此项目并没有任何问题。
我该怎么解决?看起来它是一个Eclipse的问题,但由于这个错误,我无法从IDE编译/发布我的项目。
p>对于那些谁将从Google到达那里:问题是使用cryptix库。当我将其从java构建路径中删除时,该项目被强制编译。
I have a strange problem with Eclipse Galileo.
I set Java 1.6 as my JRE. On this line of code
List templates = new ArrayList ();
I see the following error in Eclipse's problem list:
The type Collection is not generic; it cannot be parameterized with arguments
I don't have any problems with building this project with Ant.
How can I fix it? Looks like it is an Eclipse problem, but because of this error, I can't compile/publish my project from the IDE.
For those, who will get there from Google: the problem was with cryptix library. When I removed it from java build path the project is compiled sucesfully.
这篇关于类型集合不是通用的;它不能用参数<?延伸E>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!