Accessing databases within a jar file using the classpath/modulepathOnce an archive containing one or more databases
has been created it can be placed in the classpath/modulepath. This allows access to
a database from within an application without the application's knowing the
path of the archive.Accessing read-only databases from classpathRead-only databasesputting in classpath
When jar or zip files are part of the classpath/modulepath, you specify the
classpath subsubprotocol instead of the jar subsubprotocol to
connect to them.
To access a database
in a zip or jar file in the classpath/modulepath:
Set the classpath/modulepath to include the jar or zip file before starting
up :CLASSPATH="C:\dbs.jar;%CLASSPATH%"Connect to a database within the jar or zip file with the
following connection URL:jdbc:derby:classpath:databasePathWithinArchive