Fix logic for discovery of the local JRE.

Variables names and logic were wrong.  Also improve
variable names for readability.
Merge branch 'JREWindows'