DEV Community

Cover image for How to Uninstall Java on Mac?
Ruthvik Raja M.V
Ruthvik Raja M.V

Posted on

3 1

How to Uninstall Java on Mac?

Hello everyone,

There are two methods to uninstall Java on your Mac and they are as follows:-

Method 1:-

  • Click on the Finder App.[Bottom left of your Mac]
  • Navigate to Applications Folder and type JavaAppletPlugin.plugin in the search bar.
  • Finally, move the plug-in to the Bin and empty the Bin.

Then, check whether the Java software was successfully uninstalled by typing the following command in the Terminal:-

java -version
Enter fullscreen mode Exit fullscreen mode

It should prompt you to install Java if the software was successfully uninstalled.

Method 2:-

Consider if you are unable to find the plugin by entering JavaAppletPlugin.plugin in the search bar [Application Folder], then follow the below steps to remove the concrete version of the Java file [Ex: JDK file]:-

  • Check what Java versions are available by entering the following command in the Terminal:
ls /Library/Java/JavaVirtualMachines/
Enter fullscreen mode Exit fullscreen mode
  • Remove the corresponding folder with that version:
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk
Enter fullscreen mode Exit fullscreen mode

[Ex: In the above statement I am uninstalling Java 9]

Then, check whether the Java software was successfully uninstalled by typing the following command in the Terminal:-

java -version
Enter fullscreen mode Exit fullscreen mode

It should prompt you to install Java if the software was successfully uninstalled.

Done...

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay