首先,确定本地电脑里已经安装了想要的jdk版本。
右键选择项目--->build path ---->configure build path ---->libraries ---->选择jre system library ---->edit...
选择 installed JREs...
然后右边出来的框里面选择add... ---->Standard VM,
在jre home填充jdk的地址:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
点击完成。
搞定啦~