try to support Oracle JRE 7 (not JDK), which doesn't set JAVA_HOME by default