类型集合不是通用的;它不能用参数<?延伸E> [英] The type Collection is not generic; it cannot be parameterized with arguments <? extends E>

查看:215
本文介绍了类型集合不是通用的;它不能用参数<?延伸E>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,Eclipse Galileo。

我设置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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆