Corrected order of checking in latest-java-linux-detector.sh script