Description: You can store application logic in a database and then load classes from the database.
Keywords: Database class loading, Classes, storing in database, Jar files, Logic, storing in database

# Loading classes from a database

You can store application logic in a database and then load classes from the database.

Application logic, which can be used by SQL functions and procedures, includes Java class files and other resources. Storing application code simplifies application deployment, since it reduces the potential for problems with a user's classpath.

In an embedded environment, when application logic is stored in the database, Derby can access classes loaded by the Derby class loader from stored jar files.

- Class loading overview
  You store application classes and resources by storing one or more jar files in the database. Then your application can access classes loaded by Derby from the jar file and does not need to be coded in a particular way. The only difference is the way in which you invoke the application.
- Dynamic changes to jar files or to the database jar classpath
  When you store jar files in a single database and make those jar files available to that database, it is possible to make changes to jar files or to change the database jar "classpath" dynamically (without having to reboot).

Parent topic: Deploying Derby applications
Related concepts
Deployment issues
Creating Derby databases for read-only use
Deploying Derby in an embedded environment