respect JAVA_VERSION if defined