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

If you find this useful please share it!



 

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.

And that’s where you’d be wrong.


 
(Article continues below)
Get notified of new Internet Patrol articles for free!
Or Read Internet Patrol Articles Right in Your Inbox!
as Soon as They are Published! Only $1 a Month!

Imagine being able to read full articles right in your email, or on your phone, without ever having to click through to the website unless you want to! Just $1 a month and you can cancel at any time!
How to Fix the “To use the java command-line tool you need to install a JDK”

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.

No Paywall Here!
The Internet Patrol is and always has been free. We don't hide our articles behind a paywall, or restrict the number of articles you can read in a month if you don't give us money. That said, it does cost us money to run the site, so if something you read here was helpful or useful, won't you consider donating something to help keep the Internet Patrol free? Thank you!

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

Get notified of new Internet Patrol articles!
People also searched for install java keeps popping up

If you find this useful please share it!

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

  1. 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.

  2. 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!!

  3. 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 *