Definition of a JAR file for a Java routine to DB2
One way to organize the classes for a Java routine is to collect those classes into a JAR file. If you do this, you need to install the JAR file into the DB2® catalog.
DB2 provides built-in stored procedures that perform the
following functions for the JAR file:
- SQLJ.INSTALL_JAR
- Installs a JAR file into the local DB2 catalog.
- SQLJ.DB2_INSTALL_JAR
- Installs a JAR file into the local DB2 catalog or a remote DB2 catalog.
- SQLJ.REPLACE_JAR
- Replaces an existing JAR file in the local DB2 catalog.
- SQLJ.DB2_REPLACE_JAR
- Replaces an existing JAR file in the local DB2 catalog or a remote DB2 catalog.
- SQLJ.REMOVE_JAR
- Deletes a JAR file from the local DB2 catalog or a remote DB2 catalog.
- SQLJ.ALTER_JAVA_PATH
- Modifies the class resolution path of an previously installed JAR file to a specified value.
You can use IBM® Optim™ Development Studio to install JAR files into the DB2 catalog, or you can write a client program that executes SQL CALL statements to invoke these stored procedures.