Compiling the files for the user mapping plug-in (Java programming language)

After you modify the source files for the Java™ plug-in, you must compile them.

About this task

In the commands below, if the full path contains spaces, you must enclose the full path in quotation marks, for example "C:\program files\sqllib\java\db2umplugin.jar". %DB2PATH% is the directory where Db2® is installed, for example, C:\ProgramFiles\IBM\sqllib. inst_home is the instance home directory.

The commands below assume that you are using the file naming convention that is based on the names of the classes. Replace xxxx with the name that you chose.

To compile the source files:


  1. Issue the compile command:
    javac -classpath" %DB2PATH%\java\db2umplugin.jar; ^
           %CLASSPATH%" -d . ^
           .\ ^
           .\ ^
           .\ ^
    javac -classpath inst_home/sqllib/java/db2umplugin.jar:\
           $CLASSPATH -d . \
           ./ \
           ./ \
           ./ \
  2. Archive the Java class files into a single Java Archive (JAR) file:
    The period symbol after the output file name, directs the command to find and place the files in the same directory. If you change the directory, use the appropriate file path for your operating system (for example, /home/user/folder or C:\test\folder).
    jar -cfM0 UserMappingRepositoryXXXX.jar .

What to do next