Eclipse 配置JDK
一、下载地址:http://www.oracle.com/
Products->Java->Oracle JDK
选择下载、安装
二、配置Eclipce JDK(本地)
1、Window->Preferences
2、java->Installed JERS
3、Add->Next
4、Directory->选择本地JDK路径->Finish
5、选择刚配置的本地版本->Apply
6、java下的Compiler->选择编辑版本->Apply and Close
三、原有项目JDK配置(本地)
1、项目下JRE System Library->Build Path->Configure Build Path...
2、Add Library...
3、JRE System Library->Next
4、Installed JREs
5、Add...
6、Standard VM->Next
7、Directory...
8、浏览到本机安装的JDK文件夹,选中并点击“选择文件夹”按钮
9、Finish->Apply and Close->Finish完成配置
10、由于当前项目配置了2个JRE环境,则对原有的“JRE System Library”点右键,选择“Build Path”中的“Remove from Build Path”以将其移除
11、在项目中可以正常打开JDK中各类、接口等文件的源代码,则表示配置无误