Every so often I keep receiving this "java" command-line tool notification on my Macbook Air - macOS Sierra.

enter image description here

When I click on More Info it just redirects me to


Not sure what is the way to get rid of it as it just stays on the screen and I have to select an option to make it go away. I am beginning to worry if this is a virus or something and also unsure why it would lead to the Apple website instead of java (Oracle)?


The problem was in my case that I installed the JRE, which was installed only as Safari Plugin, but not as usable commandline tool. Therefore /usr/libexec/java_home -v * would not find any installed Java.

The solution is to install the JDK, not the JRE.

Recommending to install Java 6 is not a good idea, this is an outdated version that does not have current security fixes and TLS ciphers.

Oracle should fix this - should not be difficult to make a correct OSX installation.


Something is triggering the java command-line pop up, you can

  • Investigate and find out the source and disable it.

  • Install java command line from : https://support.apple.com/kb/DL1572, don't worry it's not a virus or malware this bug is known sometimes the more info button may redirect to the wrong url on some systems.

  • Can you be certain it is not malware? – Mark Jan 4 '17 at 14:02
  • @Mark well obviously no but I remember having the same issue on OS X and fixed by installing java. also why would a malware or something else redirect the java download apple url to just apple.com ? – enzo Jan 4 '17 at 14:12
  • 1
    @enzo The malware could be trying to run a Java command and just failing by macOS's natural default lack of a JDK, which would bring up the legitimate system prompt. That could be the source of the seemingly random notifications. – user24601 Jan 4 '17 at 14:28
  • @user24601 I agree with what you said, but the malware executing a java command wouldn't change the url inside the system prompt. I can't tell if it's malware or another thing that triggers the message. But I've faced this thing before when Adobe software needed old java and the prompt redirected me to apple.com instead of the download page on apple's website. – enzo Jan 4 '17 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .