

def findjar():
    calldir = os.path.dirname(os.path.realpath(__file__))
    jardir = os.path.join(calldir, 'lib', '*.jar')
    jar = glob.glob(jardir)
    if ((len(jar) == 0) or (not os.path.exists(jar[0]))):
        raise Exception(('Cannot find jar, looking at %s' % jar))
    else:
        return jar[0]

dataset/ETHPy150Open freeman-lab/spark-ml-streaming/python/mlstreaming/util.py findjar/original