JAR Statements
This documentation is for an out-of-date version of Apache Flink. We recommend you use the latest stable version.

JAR Statements #

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:

  • ADD JAR
  • REMOVE JAR
  • SHOW JARS

Attention JAR statements only work in the SQL CLI.

Run a JAR statement #

The following examples show how to run JAR statements in 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.

ADD JAR #

ADD JAR '<path_to_filename>.jar'

Currently it only supports to add the local jar into the session classloader.

REMOVE JAR #

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 JARS

Show all added jars in the session classloader which are added by ADD JAR statements.

Back to top