improve detection JRE/JDK home detection using which, fix #1