Call tabula-java with the given lists of Java options and tabula-py
    options, as well as an optional path to pass to tabula-java as a regular
    argument and an optional encoding to use for any required output sent to
    stderr.

    tabula-py options are translated into tabula-java options, see
    :func:`build_options` for more information.

def _run(java_options, options, path=None, encoding='utf-8'):
    """Call tabula-java with the given lists of Java options and tabula-py
    options, as well as an optional path to pass to tabula-java as a regular
    argument and an optional encoding to use for any required output sent to
    stderr.

    tabula-py options are translated into tabula-java options, see
    :func:`build_options` for more information.
    """
    # Workaround to enforce the silent option. See:
    # https://github.com/tabulapdf/tabula-java/issues/231#issuecomment-397281157
    if 'silent' in options:
        java_options.extend((
            '-Dorg.slf4j.simpleLogger.defaultLogLevel=off',
            '-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog',
        ))

    built_options = build_options(options)
    args = ["java"] + java_options + ["-jar", _jar_path()] + built_options
    if path:
        args.append(path)

    try:
        return subprocess.check_output(args)
    except FileNotFoundError as e:
        raise JavaNotFoundError(JAVA_NOT_FOUND_ERROR)
    except subprocess.CalledProcessError as e:
        sys.stderr.write("Error: {}\n".format(e.output.decode(encoding)))
        raise