#872 capitalising PATH + fixing comparison when path to java contains spaces + fix for issues when multiple version of java exist