钻石操作员(<))在java 1.7中不起作用 [英] Diamond operator(<>) not working in java 1.7
本文介绍了钻石操作员(<))在java 1.7中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
编译jsp文件时出现以下错误:
I have the following error for compiling a jsp file:
'<>'运算符不允许源级低于1.7
'<>' operator is not allowed for source level below 1.7
我正在使用 jdk 1.7.x
和eclipse Kepler
另外,我在Eclipse中的项目首选项中设置了 1.7作为合规级别
,仍然代码不工作
I'm using jdk 1.7.x
and eclipse Kepler
Also I have set 1.7 as compliance level
in project preferences in Eclipse, still the code is not working
应该我添加任何其他配置?
Should I add any other config?
推荐答案
检查Eclipse中的以下区域:
Check the following areas within Eclipse:
-
右键点击项目>属性>项目方面> Java>版本1.7
右键单击项目>属性> Java构建路径>图书馆> JRE图书馆应为1.7
右键点击项目>属性> Java编译器>编译器合规级别
窗口>首选项>服务器>运行环境>选择服务器>编辑>确保JRE设置为1.7
这篇关于钻石操作员(<))在java 1.7中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文