1.删除运行路径和运行环境等
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
输入密码:
sudo rm -fr /Library/PreferencesPanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Java
2.查看当前的jdk版本
ls /Library/Java/JavaVirtualMachines/
3.删除当前版本的jdk
sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk
4.检查是否卸载成功
java -version