Enable database class loading with a property

Once you have added one or more jar files to a database, you must set the database jar classpath by including the jar file or files in the derby.database.classpath property to enable Derby to load classes from the jar files.

This property, which behaves like a classpath, specifies the jar files to be searched for classes and resources and the order in which they are searched. If Derby does not find a needed class stored in the database, it can retrieve the class from the user's classpath. (Derby first looks in the user's classpath before looking in the database.)

Example:

CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(
    'derby.database.classpath',
    'APP.ToursLogic:APP.ACCOUNTINGLOGIC')

See "derby.database.classpath" in the Derby Reference Manual for more information about the property.

Note: Derby's class loader looks first in the user's classpath for any needed classes, and then in the database. To ensure class loading with the database class loader, remove classes from the classpath.
Related concepts
Dynamic changes to jar files or to the database jar classpath
Signed jar files