title: What file path format to use for connecting to derby database?
body: <p>From the <a href="https://db.apache.org/derby/docs/10.7/devguide/cdevdvlp40350.html" rel="nofollow">documentation</a> I do not really get what I have to specify when connecting to a derby database, given the path to the database as <code>java.io.File</code>.</p>
  
  <p>What has to be <code>path</code> in the following code?</p>
  
  <pre><code>File dbDirectory;
  
  // ...
  
  String protocol = "jdbc:derby:";
  conn = DriverManager.getConnection(protocol + path
                  + ";create=true");
  </code></pre>
  
  <p>Surely, it should be system independent.
  Do I use one of the following?</p>
  
  <ul>
  <li><code>dbDirectory.getAbsolutePath()</code></li>
  <li><code>dbDirectory.getCanonicalPath()</code></li>
  </ul>