From the [documentation](https://db.apache.org/derby/docs/10.7/devguide/cdevdvlp40350.html) I do not really get what I have to specify when connecting to a derby database, given the path to the database as `java.io.File`.

What has to be `path` in the following code?

```
File dbDirectory;

// ...

String protocol = "jdbc:derby:";
conn = DriverManager.getConnection(protocol + path
                + ";create=true");

```

Surely, it should be system independent.
Do I use one of the following?

* `dbDirectory.getAbsolutePath()`
* `dbDirectory.getCanonicalPath()`