CSPACE-6273: Use a regex-based method of getting JAVA_HOME path, rather than relying on 'cut' with a specific space-separated field.