ENG-6299 Added error messages when no java version detected

Added a condition that will print out an error message and exit from bash
script when there is no java version in the PATH and JAVA_HOME is not set.