sudo rm -rf /Library/Java/JavaVirtualMachines/jdk-9.jdk
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
sudo rm -fr ~/Library/Application\ Support/Oracle/Java
根据java版本选择卸载,上面第一行是卸载java9
转载于:https://www.cnblogs.com/xLI4n/p/9516644.html