#709620 [java-wrappers] support detection of headless JREs