Question

I have MacOS El Capitan

About Java, in the /Library/Java/JavaVirtualMachines path I have:

enter image description here

All works fine.

But I did realize about the following in System Preferences:

enter image description here

Observe in the bottom the Java icon.

If I do clic in there, it opens:

enter image description here

And finally

enter image description here

Observe it is Java 10 and is not listed in the /Library/Java/JavaVirtualMachines path.

Questions:

  • Where is installed? or where is its location?
  • Is safe to remove it? All my customs apps (IDE, programs uses according the case any JDK avaiable from the /Library/Java/JavaVirtualMachines path).
  • How to delete? I am assuming deleting some directory. But perhaps it requires a special approach. I want avoid problems.
Was it helpful?

Solution

You can uninstall Java from the command line by using the rm command, this is aimed for advanced users who understand the ramifications of using rm with superuser privileges. This is not for novice users, using the command line requires precise syntax and failure to use proper syntax may result in erroneous commands or unintended data loss.

One by one, execute each of the following commands individually:

sudo rm -rf "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin"

sudo rm -rf "/Library/PreferencePanes/JavaControlPanel.prefPane"

sudo rm -rf "~/Library/Application Support/Java"

Observations: This requires authenticating with sudo. Be certain you have the syntax 100% correct, if you are not sure if the syntax is correct do not execute the commands, and instead you’d likely want to use the Finder based approach of uninstalling java instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top