bin/env: do not silently accept undefined vars

Also: say something more helpful if JAVA_HOME in particular is
undefined