You can use a databaseName attribute on a database connection URL to specify the name of the database to which you want to connect.
jdbc:derby:;databaseName=databaseName
You can access read-only databases in jar or zip files by specifying jar as the subsubprotocol, like this:
jdbc:derby:jar:(pathToArchive)databasePathWithinArchive
Or, if the jar or zip file has been included in the classpath, like this:
jdbc:derby:/databasePathWithinArchive