Environment Note: Prior to upgrading the MAC system is installed in Java 7 in the normal use of Eclipse, the upgrade can not be used after the purpose: Delete Java 7 back to the JAVA6 environment to reconfigure the Eclipse INSTALLJRE path Java package
The operation is as follows:
Switch to root permissions under Mac:topwqp:~ wangqiupeng$ Sudo-i
Password:
topwqp:~ root# WhoAmI
Roottopwqp:~ root#
Delete Java 7 environment under Mac: Refer:http://docs.oracle.com/javase/7/docs/webnotes/install/mac/mac-jdk.htmluninstalling the JDK
To uninstall the JDK, you must has Administrator privileges and execute the Remove command either as root or by using the sudo (8) tool.
Navigate to /library/java/javavirtualmachines and remove the directory whose name matches the following format:*
/LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK<major>.<minor>.<macro[_update]>. JDK
For example, to uninstall 7u6:
% RM-RF JDK1.7.0_06.JDK
The following actions are performed: topwqp:~ root# cd/library/java/javavirtualmachines/
Topwqp:javavirtualmachines root# RM-RF JDK1.7.0_55.JDK
Topwqp:javavirtualmachines root# ls
Topwqp:javavirtualmachines root# java-version
Java version "1.6.0_65" Java (TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11m4716)Java HotSpot (TM) 64-bit Server VM (build 20.65-b04-466.1, Mixed mode
After the above operation is completed, Java 7 is deleted, and now the environment programming JDK6
This machine looks for the JDK installation path:opwqp:home wangqiupeng$ pwd/system/library/java/javavirtualmachines/1.6.0.jdk/contents/home
Java7 cannot be used after upgrading Yosemite