How To Get Rid Of Mac Jdk Message For Java Commandline Tool



The need to have Java installed on your Mac is needless, to say the least.

I keep getting the message 'To use the 'java' command-line tool you need to install a JDK. Now, to the best of my knowledge, Java isn't on my MacBook Pro (from May 2015). I ported from another computer that had had Java removed although just how I no longer remember. If you’re seeing a pop-up that says “To use the java command-line tool you need to install a JDK” and left wondering “How do I do that?” this is the article for you. For macOS Catalina and higher. Go to Oracle’s Java downloads page. Download the Mac installer. (You want this one: jdk-13.0.2osx-x64bin.dmg. Do not get the one with.

Why may you ask? Because it’s not required for most of the applications on the machine. Besides, if any applications do need it, we can install it then whenever we’re asked.

However, the issue with Java is that it comes preinstalled (without permission) and it is no straightforward task where you can hit an “Uninstall” button just like every other application to remove it.

Now bear in mind that some applications, specifically applications that are Java-dependent like IDEs (if you’re a developer you’ll know what we mean), office suite applications like OpenOffice or LibreOffice, torrent clients and more will rely on Java to work. In any case, after uninstalling Java on your Mac that one of your applications start not to work, then you can always reinstall Java on your Mac.

In this guide, we will show you step-by-step on how to uninstall Java entirely from your Mac.

TABLE OF CONTENTS

How to Uninstall Java on Mac: 9 Steps

  1. Firstly, close any running background apps or search browsers. Also, make sure to close any application which uses Java mainly. Now, of course, you may not know which application uses Java; hence which is why we suggest to close down every app first.
  2. Next, go ahead and open Finder on your Mac.
  3. Now from the top menu bar select Go and under the dropdown menu choose to Go to Folder…
Mac

How To Get Rid Of Mac Jdk Message For Java Command Line Tool Message

  1. Great! What you will need to do now is copy-paste the below path into the Go to the path pop-up and then hit Go.

/Library/Internet Plug-ins/

  1. Now you will be brought to your Internet Plug-Ins location in your Mac. Here locate the JavaAppletPlugin.plugin and then delete it. Take note that removing this plugin will require you to know your admin password. Enter the admin password when prompted.
  1. So one down, two more files to go. Again, from the top menu bar select Go and under the dropdown menu choose to Go to Folder… and copy-paste the below path into the Go to the path pop-up and then hit Go.

/Library/PreferencePanes/

  1. Here you will be in your Preference Panes location in your Mac. Here locate the JavaControlPanel.prefPane and then delete it. Again, you will require to know your admin password. Enter the admin password when prompted.
  2. Two down. One more to go. Again, from the top menu bar select Go and under the dropdown menu choose to Go to Folder… and copy-paste the below path into the Go to the path pop-up and then hit Go.
  3. Lastly and this time remove the Java folder altogether. Copy-paste the below path into the Go to the path pop-up and then hit go. Again, you may require to know your admin password. Enter the admin password when prompted.

~/Library/Application Support/Java/

That just about should uninstall Java completely from your Mac. Make sure that you empty your Trash on your Mac.

Alternatively 💡

You can also use your Mac’s Command-Line to remove all three files with just three lines quickly. Now, of course, you will need to be comfortable with using the Command-Line. However, if using the Command Line is like a second language to you then the steps from the section below will drastically save you plenty of time looking up each of the files and then deleting them manually.

How To Get Rid Of Mac Jdk Message For Java Command Line Tool From Mac

The Fastest Method: Using Your Mac’s Command-Line 🚀

Take note that you must be careful when entering the code below into your Command-Line as mistyping a syntax such as ‘rm’ with superuser privileges can cause a whole lot of unwanted trouble.

Here are the steps:

  1. Go ahead and open up your Command-Line on your Mac.
  2. Now one by one carefully enter the following lines individually into the Command-Line:

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

How To Get Rid Of Mac Jdk Message For Java Command Line Tool Mac Message

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

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

  1. Lastly, watch as the magic happens where all the three files associated with Java on your Mac will be uninstalled completely.

You’re done! As aforementioned in the beginning part, if you were ever to encounter one of your existing applications stopped working on your Mac after uninstalling Java, then you may try to reinstall Java again if you wish to use the app. However, most Mac users will never require Java, and hence the methods above will altogether remove it from your Mac.

We hope that this guide has helped uninstall Java on your Mac. If you have questions, please feel free to leave a comment below, and we will love to help you out. ❤

How To Get Rid Of Mac Jdk Message For Java Command Line Tool

If this guide helped you, please share it. 🙂