fix latestJavaHome return code detection