In embedded mode, your application runs in the same JVM as
Derby,
so you can also set system properties within an application using a
Properties object before loading the
Derby JDBC driver. The following
example sets
derby.system.home on Windows.
Properties p = System.getProperties();
p.put("derby.system.home", "C:\databases\sample");