Changing the system-wide properties programmatically

You can set properties programmatically-either in application code before booting the Derby driver or as a command-line option to the JVM when booting the application that starts up Derby. When you set properties programmatically, these properties persist only for the duration of the application. Properties set programmatically are not written to the derby.properties file or made persistent in any other way by Derby.
Note: Setting properties programmatically works only for the application that starts up Derby; for example, for an application in an embedded environment or for the application server that starts up a server product. It does not work for client applications connecting to a server that is running.
Related concepts
Changing the system-wide properties by using the derby.properties file
Verifying system properties