How to Fix the “To use the java command-line tool you need to install a JDK”

fix java command-line error mac
Share the knowledge

If your Mac keeps popping up the error “To use the “java” command-line tool you need to install a JDK”, and you keep thinking that you have installed it, but to no avail, you’re not alone. Here’s what you actually need to do to vanquish this beast.

You may have already searched for answers, finding such varied answers as “delete the cache and cookies on your browser” to “sacrifice a goat to the ghost of Steve Jobs”, but none of these things work (plus the goat doesn’t like it).

to use the java command-line tool you need to install a jdk

First, to understand what is causing the issue, one or more applications (you know…programs, in oldspeak) on your Mac are calling for Java and not finding it (or at least not recognizing it). This most often happens with Macs that have been updated or upgraded to a newer flavour of OS X 10 (usually Yosemite, El Capitan, Sierra, High Sierra, or Mojave; also known as OS X 10.10, 10.11, 10.12, 10.13 and 10.14, respectively) or that came with an OS X 10+ installed.

So, you think (reasonably enough) that the issue must be that your Java install isn’t updated (enough) for the new OS version.

The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.

CashApp us Square Cash app link

Venmo us Venmo link

Paypal us Paypal link

And that’s where you’d be wrong.

Because in reality, what is happening is that the application or applications that are throwing the error are actually looking for an older, legacy version of Java, and not finding it! Specifically, it is looking for the legacy Java 6.

So, to fix the error, you need to download and install Java 6, also known for these purposes as Java for OS X 2015-001.

Fortunately, Apple has made this easy, as they recognize their screw-up in shipping apps that still rely on a deprecated (i.e. discontinued) version of Java.

Also fortunately, installing the older version does not seem to impact any programs relying on the newer version, at least in our experience.

To download this legacy version of Java, to fix the “To use the java command-line tool you need to install a JDK” error, go here:

Fix the “To use the java command-line tool you need to install a JDK” error” now!

At the top of the page at that link, you will see this:

fix the To use the java command-line tool you need to install a JDK error

Just click on ‘Download’, and you will have quickly fixed the issue.

Get New Internet Patrol Articles by Email!

The Internet Patrol is completely free, and reader-supported. Your tips via CashApp, Venmo, or Paypal are appreciated! Receipts will come from ISIPP.

CashApp us Square Cash app link

Venmo us Venmo link

Paypal us Paypal link

 


Share the knowledge

9 thoughts on “How to Fix the “To use the java command-line tool you need to install a JDK”

  1. I’ve followed your suggestion, and unfortunately, when trying to install the Java for macOS 2017-001 software, the MAC gives you an error message that says, “…it can’t be installed on this disk…” (presumably because it’s an older version than that which is already installed. Now what!?

  2. But all these solutions assume that I want Java. I have disabled it in System Preferences, but these annoying reminders about a JDK keep coming. I want these reminders stopped.

  3. I have put up with this for months and you got it right and I have no more dialog box appearing. Wonderful and my anxiety level just went down a lot!!

  4. If you read the paragraph below the download button, you will see that it a download for Java 6 which is what you need. I was having the same problem. I downloaded and installed the program a couple days ago have not gotten the error since.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.