After the mac OS is upgraded to Mountain Lion, eclipse cannot find the JRE and does not know why. After the upgrade, click eclipse and the prompt "no Java" is displayed. So install the java development environment provided by Apple https://developer.apple.com/downloads/index.action selected Java for OS X 2012-004 Developer Package download, installation. Run eclipse again. At the same time, the Android project can be compiled and run. However, normal java projects cannot be compiled, and the preference setting of Eclipse prompts that there is no JRE setting. Using preference settings --> Java --> Installed JREs cannot find the JRE home directory identified in jre eclipse in the format... /Contents/Home www.2cto.com to view the java path java->/System/Library/Frameworks/JavaVM. framework/Versions/Current/Commands/java VM path. /Library/Java/JavaVirtualMachines, but this directory contains only one 1.6.0 _ 33-b03-mongo.jdk file. Double-click the file to display the java preference settings in the system tool .. Finally, right-click the jdk file and choose "show Package content" to view the Contents/Home structure. Copy the Contents folder and place it in the directory of the jdk file level. Then, return to eclipse, in jre settings, navigate the jre directory to this folder .... Yes... Why ~~ Author Zxlong