eclipse里不支持泛型的解决方法

来源:互联网 发布:linux系统ghost下载 编辑:程序博客网 时间:2024/04/27 19:12

eclipse里不支持泛型的解决方法

在myeclipse里引入新项目的时候会报如下错误:在使用泛型的地方提示: Multiple markers at this line - Syntax error, parameterized types are only available if source level is 5.0 - The type List is not generic; it cannot be parameterized with arguments <Application> 1)一种是Eclipse对所有项目默认的设置是5.0以下,项目继承了默认设置(在Preferences/Java/Compiler里改为5.0或高于5.0)另一种是项目里设置了source level 5.0以下(在 项目属性/Java Compiler 里改为5.0或高于5.0)   你的JDK 版本比较旧,或者你装了比较新的版本,但是你在Eclipse中的设置有问题,编译级别设置的不是比较新的版本的编译器。
原创粉丝点击