Respect the JAVA_HOME environment variable

When the JAVA_HOME environment variable is set, use it to find the java executable for launching java subprocesses.