0%

解决Mac OS下Eclipse能运行却找不到JRE的问题

系统为Mac OS 10.6.7,Eclipse为Galileo for php(自带PDT,不用装了,图个方便),在Windows下也是下的这个版本,解压完直接可以写JAVA,但今天在Mac OS下测试却不行.Eclipse可以正常运行,但是首选项里没有找到已经安装的JRE,自然也就无法编译运行.提示The specified JRE installation does not exist.我以为不能识别JRE,就装了个openJDK 1.7,结果在添加JRE的时候Eclipse却提示”Standard VM not Supported on MacOS”,无法添加JRE.经过大半天的搜索,总算在国外一论坛上找到解决方法:安装Eclipse Java Development Tools. 具体步骤:帮助-Install New Software-Work with选择 Galileo - http://download.eclipse.org/releases/galileo,根据Eclipse版本不同会有所区别.找到Eclipse Java Development Tools,应该在Programming Languages分类里,安装后重启Eclipse,再打开首选项,可以找到系统已经安装的JRE,问题解决.