KNOX-262: Improve JRE detection in scripting.