Bundling Java libraries with a DB2 Java stored procedure
-
04-06-2021 - |
Question
Creating a DB2 Java stored procedure using IBM Data Studio, I have some libraries that are required in the classpath. I'm running Data Studio in a VM, and deploying remotely to my DB2 server in a Cloud instance.
How do I bundle up the jars with my stored procedure?
Solution
When deploying the stored procedure to the server:
make sure you click Next instead of Finish to get to the second screen:
and there, in the Compile options: field append your dependencies using the -classpath
command-line option.
Note: the -cp
shorthand option will not work!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow