def _spawn_java(cmd,
                search_path=1,
                verbose=0,
                dry_run=0):
    executable = cmd[0]
    cmd = ' '.join(_nt_quote_args(cmd))
    log.info(cmd)
    if not dry_run:
        try:
            rc = os.system(cmd) >> 8
        except OSError, exc:
            # this seems to happen when the command isn't found
            raise DistutilsExecError, \
                  "command '%s' failed: %s" % (executable, exc[-1])
        if rc != 0:
            # and this reflects the command running but failing
            print "command '%s' failed with exit status %d" % (executable, rc)
            raise DistutilsExecError, \
                  "command '%s' failed with exit status %d" % (executable, rc)
dataset/ETHPy150Open babble/babble/include/jython/Lib/distutils/spawn.py/_spawn_java/original