I didn't need a full JDK, I just needed to get the JRE to work, and none of the other answers above worked for me. It may have worked before, but now (July 1, 2018) it does not work. I just kept getting an error message and a popup.
I finally solved this problem by putting the following JAVA_HOME export in ~ / .bash_profile:
export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
Hope this helps someone. I am using Mac OS High Sierra.
source
share