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



When I click on More Info it just redirects me to 


  http://www.apple.com/safari/


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.