Mac JDK 卸载

查询信息

jdk 版本查询

  [plaintext]
1
2
$ ls /Library/Java/JavaVirtualMachines/ jdk1.8.0_91.jdk

系统配置

  [plaintext]
1
vi ~/.bash_profile

其中 java 相关内容

  [plaintext]
1
2
3
4
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

删除

  [plaintext]
1
2
3
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