def METHOD_NAME(command):
    try:
        p = subprocess.Popen(
            [command[0], "-version"], stdout=subprocess.PIPE,
            stderr=subprocess.PIPE)
        p.communicate()
        rc = p.wait()
        if rc == 0:
            return
    except:
        pass  # Falls through to raise
    raise Exception("Java could not be found. (Executable=%s)" % command[0])