How to uninstall JAVA JDK from mac OS

user9041566 :

I Installed JAVA version 10. But I can't run react native with android because android doesn't support java version 10.now I need to revoke my java version to 8 How can I do it.

Akila Devinda :

You can get official oracle instruction to remove java from macOS here

In your macOS terminal type this one by one

sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin 
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane 
sudo rm -fr ~/Library/Application\ Support/Oracle/Java


After that you can navigate to specific version of java that you intend to delete by using the following command:

cd /Library/Java/JavaVirtualMachines

Then type ls in your terminal to list down all the Java Virtual Machine Folders.
Finally add the version number you want to delete like this

sudo rm -rf jdk-10.0.1.jdk

Instead of jdk-10.0.1.jdk you can give any version number which are listed down in your above mentioned folder.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=36735&siteId=1