How to make the Mac’s annoying “To use the java command-line tool you need to install a JDK” pop-up go away forever

Updated March 22nd, 2021.

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

  1. Go to Oracle’s Java downloads page. Look for the highest-numbered version, probably near the top of the page. As of Monday, March 22nd, 2021, it’s Java SE 16. Click JDK Download.
  2. Download the Mac installer. (You want this one: jdk-16_osx-x64_bin.dmg. Do not get the one with “tar” in the name– it won’t work.)
  3. Run the installer.

You will have to create an “Oracle Account” in order to download. Sort of a drag but you can’t do the download if you don’t create an account.

That’s all there is to it.


For macOS 10.14 and older

Some older Mac apps (Adobe’s Photoshop is one) require Java in order to work. Java is not part of the macOS so it has to be installed manually. The problem is, the modern Java installer puts Java into a different location than it used to, so when these older apps look for Java, they don’t find it, even though it’s there– because they are looking in the wrong place.

The solution is to install an older version of Java, with an installer that puts things where Adobe expects to find them.

You would think that clicking the “More Info…” button in the “you need to install a JDK” pop-up would take you to a page where you could download the proper version of Java… but that’s not the case. The “More Info…” button takes you to the page for the latest version of Java, not the older one.

Click here to go to the older, “Legacy” Java installer page on Apple’s website. You’ll see a picture of a lion. That’s because Lion (10.7) was the current macOS when that version of Java came out.

Mac OS X 10.7 "Lion"
Mac OS X 10.7 “Lion”

Download the installer from that page, run the installer, and you’re done. No more annoying pop-up.


Speaking of pop-ups…

If you have an HP printer, and are using Catalina or Big Sur, you may be getting pop-ups saying things like “This HP software may damage your computer.” Scary stuff! Here’s my article that tells you how to solve that problem.


Did this article help you?

Maybe you'd like to contribute to the
Christian Boyce coffee fund.




Want some some quick iPhone how-tos?
Visit me at iPhoneinaminute.com.

Looking for in-depth tutorials?
See my christianboyce.com website!



Please use the “Sharing” buttons to share what’s interesting with your friends. It helps them and it helps the blog. Thank you very much!

Sincerely,
Christian signature
Christian Boyce

19 thoughts on “How to make the Mac’s annoying “To use the java command-line tool you need to install a JDK” pop-up go away forever

Add yours

  1. Finally, thx Christian! This has been annoying me for a couple of months now. Btw the text in your comment box is white by default, which is very hard to read while typing with the grey comment box background. I would recommend to change it to black or the dark blue you use on the entry-author div. If I click outside the box while having typed something, the color changes. There is probably something off in the css

    1. Very interesting about the comments. When I type in the comments it’s white text against a black background. When I click outside the box it changes to black against grey. I will see about changing this. Thanks for letting me know.

  2. How do I get rid of the JDK Line tool pop up? I don’t want to install anything from Adobe. I don’t have Photoshop. I don’t need it. Thank you.

  3. new Catalina started showing this again and doesn’t allow to install this JDK as “newer version is installed”.

    1. From what I’ve read, the older Java can’t be installed on Catalina as it is not 64-bit. I’m guessing that whichever app you have that needs the older Java is also not 64-bit. So maybe it is time for an update on an app. The app asking for Java is often one from Adobe.

  4. Dealing with the repercussions of updating to Catalina. All of my apps are updates as well but still getting the Java pop-up. Is there any fix for this? Why isn’t Apple addressing this issue?

    1. The old solution doesn’t work because the old version of Java isn’t 64-bit. The pop-up problem is probably caused by an old version of an Adobe app– maybe something that you aren’t using, or have a newer version for. There could be an uninstall-reinstall solution but I’d have to know more about your Mac’s software to give you specific answers.

  5. I thought I had uninstalled everything Adobe but I’m still getting this popup and I’m on Catalina so this legacy version doesn’t work. Are there any ways I can figure out which other app might be asking for java?

    1. Hi Alice. Finding out which app is calling for java is pretty hard, but installing another version of Java might solve it (and it’s easy). Try the Mac installer on the Oracle page: https://www.oracle.com/java/technologies/javase-jdk13-downloads.html#license-lightbox. If you double-click the installer and it doesn’t work, control-click on it and then choose “Open” and you’ll be able to proceed. This article (by me) explains that process. https://christianboyce.com/open-app-unidentified-developer/. Let me know how it goes– if it works, I’ll update my article.

  6. Hi Christian, I took your suggestion in the last comment here and it worked for me. I needed to sign up on the Oracle page to download the installer, and the pop-ups have stopped appearing after installation. The whole process took a few minutes. Thanks a lot, I was really struggling to fix this, and nothing was working till I found your article.

  7. I recommend backup before you start deleting files.

    The problem stems from a program attempting to access the Java development kit. Unless you really need Java development kit I suggest you remove the offending program or stop the offending program triggering the request.

    In most cases this relates to a Facebook videochat.Plist

    In the GO Menu > Go to Folder…

    type:

    cd ~/Library/LaunchAgents

    this will take you to the LaunchAgents folder

    look for ‘com.facebook.videochat.[username].plist’

    Delete it

    If you do not see this file, another application may be activating the Java.

    Type:

    grep -i “java” *.*

    This searches for the word java (case insensitive) in all files in that directory.

    If the grep search gives you a result and tells you the file name, this is most probably this file which is causing the problem.

    Delete it

    Restart, see if that fixes the problem.

  8. Thank you so much for this, Christian! This was really annoying me for a long time. If I had known the fix was this easy, I would have done this a long time ago. Will pass this on to others having this problem as well.

    1. Glad that problem’s behind you. I would think that an Apple update would have taken care of this– we KNOW what the problem is, and how to fix it, so how about making it automatic, Apple?

  9. Hey Christian,

    I appreciate this article! I was able to navigate to the Oracle page and download the latest JDK software. Hopefully it fixes that popup. I noticed the version you recommended is no longer available, and the links aren’t active. Maybe they took down that specific 13.0.2 version?

    I used jdk-15.0.2_osx-x64_bin.dmg

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑

Read our Privacy Policy

%d bloggers like this: