[摘要]eclipse提示jdk版本过低解决方法:在java编程的时候,有时换了个版本会出现Syntax error, for each statements are only available if s...
eclipse提示jdk版本过低解决方法:
在java编程的时候,有时换了个版本会出现Syntax error, 'for each' statements are only available if source level is 1.5 or greater,这个错误,我这里给大家介绍一下可能错误的地方。
1、检查你所安装的jdk,正常安装的jdk都会在C:\Program Files\Java或C:\Program Files (x86)\Java,具体看你所使用的win是32还是64位的,根据自己的电脑来选择jdk

2、如果你可以确定你自己所使用的jdk版本是正确的,这是就需要查看你说引用的jdk是否正确是否是自己需要引用的,一般在项目中会有显示

3、发现不正确的话就右键项目在弹出框中选择properties,在跳出来的弹窗中选择Java Build Path 并在右侧的新窗口选择Libraries 最后点击Add Library

4、选择JRE System Library 点击Next 进入下个页面installed JRE 选择你需要的JER版本,记得在单选更改一下

学习教程快速掌握从入门到精通的电脑知识
关键词:eclipse提示jdk版本过低怎样办 eclipse提示jdk版本过低处理办法