Mac Tips

How to Uninstall Java on Mac

by Jenefey Aaron   Updated on 2020-03-09 / Update for  OS X

Most of the Apple users require Java on their Mac devices, since they need it for one or the other reasons. Although installing of Java is an easy process, the tricky part is to remove Java from Mac. People start scratching their heads when they wish to remove Java from Mac. Well, as a matter of fact we have a solution to this. Follow the steps given below to know answer to "how do I uninstall java on Mac" question.

How to Remove Java from Mac?

Well, as stated earlier, installing Java is much easier that removing it from Mac. To completely remove Java from your device, you need to follow systematic steps. This is done in three parts. Follow the steps given below to know how to delete Java on Mac.

Part 1: Remove Java Plugins from your Mac

To remove Java completely from your device, you need to begin by removing the Java plugin that is present on your device. Just follow the below steps that will guide you to remove Java plugins.

  • Make sure that any app running on Java is closed and shut down. If any app is running in the background, Java will not be removed completely. Begin by using the Mac Finder. From Mac Finder, you need to use the "Go" menu. Select the "Go To Folder" option.
  • Once you click the option, enter the below given path:

    /Library/Internet Plug-ins/
  • java plugin
  • As soon as you hit enter, you will be taken to that location. All you need to do is locate the "JavaAppletPlugin.plugin" file. This is the plugin that you need to delete.

Part 2: Remove Java PreferencePanes from your Mac

After you delete the Java plugins, next you have to remove the Java PreferencePanes from your Mac. This is very simple if you follow the below given steps.

  • From Mac Finder, you need to use the "Go" menu. Select the "Go To Folder" option.
  • Once you click the option, enter the below given path:

    /Library/PreferencePanes/
  • As soon as you hit enter, you will be taken to that location. All you need to do is locate the "JavaControlPanel.prefPane" file. This is the file that you need to remove.

Part 3: Remove Java Folder from your Mac

This is the last and the final part you need to perform so as to remove Java completely from your device. Follow the below steps and you will be over with deleting Java from Mac.

  • From Mac Finder, you need to use the "Go" menu. Select the "Go To Folder" option.
  • Once you click the option, enter the below given path:

    ~/Library/Application Support/Java/
  • java folder
  • As soon as you hit enter, you will be taken to that location. All you need to do is remove the complete "Java" folder present on that location.

Empty your trash and restart your device. This is just to make sure that Java is entirely removed from your device.

Uninstall Java Using Command Line from Mac

This is one more method that can help you to get rid of Java from your Mac device. This is done by using command line instructions. The method is not recommended. This is because, even a slight mistake in the command line syntax might lead to irreversible changes causing data loss and a great damage. But still, if you wish to follow this method, use the below steps to know how to uninstall java runtime environment on Mac.

All you need to do is execute the below given command line syntax one by one individually.

sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"
sudo rm -rf "/Library/PreferencePanes/JavaControlPanel.prefPane"
sudo rm -rf "~/Library/Application Support/Java"

Extra Tip: Recover Data on Mac in An Easy Way

Since using command line is a risky job, people still tend to use it. And some time, if a wrong command is given, they end up in a mess. This might lead to your device not working properly, or even worse such as data loss. Chances of your data being lost in such cases are very high. And if by chance you lose your data, you can always depend on Tenorshare Mac Data Recovery. This software is the best and most reliable tool that helps the users to recover and restore all their lost data. In addition to this, it is very simple to use.

data recovery from mac

Long story short, these were the top 2 methods to know how to uninstall java development kit Mac. But we advise you not to use command line syntax since that is risky and might lead to data loss. You can inform us about different methods (if you are aware of any) and provide us your feedback by commenting below.

Recover Unlimited Mac Data for You
  • Recover data deleted, formatted or lost on Mac;
  • Restore files from hard drive and external storage devices;
  • Recover data from failed/crashed/dead MacBook;
  • Fully supported latest macOS 10.15 Catalina;