Require java

Fixes #735

`[ -z "$JAVA_HOME" ]` happily accepts an empty string, which is not a desired behavior.