title: “JAR Statements” weight: 16 type: docs aliases:
JAR statements are used to add user jars into the classpath or remove user jars from the classpath or show added jars in the classpath in the runtime.
Flink SQL supports the following JAR statements for now:
Attention JAR statements only work in the [SQL CLI]({{< ref “docs/dev/table/sqlClient” >}}).
{{< tabs “add jar statement” >}} {{< tab “SQL CLI” >}}
The following examples show how to run JAR
statements in [SQL CLI]({{< ref “docs/dev/table/sqlClient” >}}).
{{< /tab >}} {{< /tabs >}}
{{< tabs “add jar” >}} {{< tab “SQL CLI” >}}
Flink SQL> ADD JAR '/path/hello.jar'; [INFO] The specified jar is added into session classloader. Flink SQL> SHOW JARS; /path/hello.jar Flink SQL> REMOVE JAR '/path/hello.jar'; [INFO] The specified jar is removed from session classloader.
{{< /tab >}} {{< /tabs >}}
ADD JAR '<path_to_filename>.jar'
Currently it only supports to add the local jar into the session classloader.
REMOVE JAR '<path_to_filename>.jar'
Currently it only supports to remove the jar that is added by the ADD JAR
statements.
SHOW JARS
Show all added jars in the session classloader which are added by ADD JAR
statements.
{{< top >}}