Homebrew/homebrew — pull request #32164 by drewish (2014-09-08 19:46:26+00:00)
Title: Highlight the need for a JAVA_HOME env variable

I spent a bunch of time trying to figure out why launchctl wasn't starting Elasticsearch after upgrading to 1.3.2. The short version is I had the 1.7 JRE, rather than JDK installed, so `/usr/libexec/java_home` didn't see it. Two choices to fix it:
- install the JDK (1.7 or 1.8)
- set the `JAVA_HOME` environment variable in such a way that it's available to launchd

So my suggested fix is to just highlight that you might need to set `JAVA_HOME`. I tried to follow the convention from https://github.com/Homebrew/homebrew/issues/9833.