Connecting to databases when the path is ambiguous because of databases in the classpath

To connect to a database in the file system when the connection URL that you would use would be ambiguous with a database in the classpath, use the following form of the connection URL:

jdbc:derby:directory:databasePathInFileSystem

For example,

jdbc:derby:directory:/products/boiledfood

Apart from the connection URL, databases in archives in the classpath behave just like databases in archives accessed through the file system. However, databases in archives are read-only.

Related concepts
Connecting to databases with ambiguous paths to databases in the file system