Mac JDK 卸载

查询信息

jdk 版本查询

$ ls /Library/Java/JavaVirtualMachines/
jdk1.8.0_91.jdk

系统配置

vi ~/.bash_profile

其中 java 相关内容

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
CLASSPAHT=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
PATH=$JAVA_HOME/bin:$PATH:
export JAVA_HOME

删除

sudo rm -rf /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk
sudo rm -rf /Library/PreferencePanes/JavaControlPanel.prefPane 
sudo rm -rf /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin