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
- 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.
- 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.)
- 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.
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!
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
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.
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.
Just follow the instructions in my blog post. I don’t know who or what is asking for the Java command-line tool, but you can make it go away using my instructions here.
new Catalina started showing this again and doesn’t allow to install this JDK as “newer version is installed”.
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.
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?
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.
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?
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.
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.
That’s awesome, Kedar! I’ve updated the article based on your success.
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…
this will take you to the LaunchAgents folder
look for ‘com.facebook.videochat.[username].plist’
If you do not see this file, another application may be activating the Java.
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.
Restart, see if that fixes the problem.
That’s great if the app that’s calling for Java isn’t one you use any longer.
Wow! thx so much, I’ve been dealing with this for years!! Now…..running smoothly.
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.
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?
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
I’ll have to update my links. Thanks for this. Ever-changing world out there. Glad you got what you needed.
Thanks for the simple straight forward fix of Java on older OS. I have lived with the annoyance since upgrade to Sierra and it’s been several years. Great fix. it worked!
Many thanks for your clear explanation. Really helpful and efficient. 🙂