def METHOD_NAME(options, pid):
    if options.executable:
        return options.executable
    java = os.readlink("/proc/%d/exe" % pid)
    java_d = os.path.dirname(java)
    jstat = os.path.join(java_d, "jstat")
    if os.path.exists(jstat):
        return jstat