MyEclipse中更换JDK及工程警告问题

时间:2022-07-17 07:01:49
MyEclipse8.6默认用自带的JDK,最高版本是1.6,如果想用自己安装的JDK1.7,设置方法:
菜单window--->Preferences--->Java--->Installed JREs,把默认JDK1.6的改为自己新安装的JDK1.7。

这时在java project中会警告:
Description Resource Path Location Type Build path specifies execution environment JavaSE-1.6. There are no JREs installed in the workspace that are strictly compatible with this environment.      communication  Build  path JRE System Library Problem
去除警告方法:工程名称上右键菜单:Properties--->Java Build Path--->Libraries,选中"JRE System Library[JavaSE-1.6]",选择右侧按钮“Edit",打开新界面中选择"Workspace default JRR (JDK1.7......)"即可。