Syntax error, parameterized types are only available if source level is 1.5
2016-04-14 15:22
639 查看
ArrayList<String> temp = new ArrayList<>();
出现"Syntax error,parameterized types are only available if source level is 5.0"错误
说明编译环境不是在5.0,但是MyEclipse中应用的jdk明明是1.5或以上版本。
有两种方法处理:
一种是Myeclipse对所有项目默认的设置是5.0以下,项目继承了默认设置(在Myeclipse IDE中的菜单Window/Preferences/Java/Compiler里改为5.0或高于5.0)
另一种是单个项目里设置了source level 5.0以下(在项目属性/Java Compiler 里改为5.0或高于5.0)
出现"Syntax error,parameterized types are only available if source level is 5.0"错误
说明编译环境不是在5.0,但是MyEclipse中应用的jdk明明是1.5或以上版本。
有两种方法处理:
一种是Myeclipse对所有项目默认的设置是5.0以下,项目继承了默认设置(在Myeclipse IDE中的菜单Window/Preferences/Java/Compiler里改为5.0或高于5.0)
另一种是单个项目里设置了source level 5.0以下(在项目属性/Java Compiler 里改为5.0或高于5.0)
相关文章推荐
- Handler.sendMessage 与 Handler.obtainMessage.sendToTarget比较
- 11.2.0.1升级到11.2.0.4报错之一:UtilSession failed: Patch 9413827
- wait()和notify()/notifyAll()
- ICPCCamp 2016 Day 1 - B All Pair Shortest Path (bitset)
- 70. Climbing Stairs
- Aizu 0005 GCD and LCM【辗转相除法】
- 70. Climbing Stairs
- Aizu 2224 Save your cats【最大生成树】
- MDK 5.10 -- Reading one or more Pack descriptions failed
- VS2008或以上版本的ActiveX控件的测试工具(ActiveX Control Test Container)编译记录
- CDISC SDTM SV domain 学习笔记
- SSH出现Host key verification failed
- 了解点OpenAI及深度学习研究前沿
- 【RAID】基本结构
- sleep()、wait()、yield()、join()方法 解析
- 数据仓库专题(23):总线矩阵的另类应用-Drill Down into a More Detailed Bus Matrix
- 从人工智能的“冬天“走出来
- [Consul]Error starting agent: Failed to get advertise address: Multiple private IPs found.
- baidu实习日志(入职篇)
- 理解TimesTen错误日志信息"waiting for latch"