You must move the databases and JavaDB (derby) db file log files to the deployment directories. The database works in the application launch directory, because JavaDB creates a folder with the database name (in my case mydb), but I want to move this directory to a subdirectory called data / create data / mydb. I can do this by calling connect:
DriverManager.getConnection("jdbc:derby:data/mydb;create=false");
and it works. But I would like to explicitly set the value programmatically
derby.system.home = data /
derby.stream.error.file = Log /derby.log
So, I can do:
DriverManager.getConnection("jdbc:derby:mydb;create=false");
and all dbs will be in this data / dir. And the derby log file will be in /! I just can't figure it out. Anyone help? Is there a way to set these properties programmatically (because it's built-in)?
java derby javadb
pn1 dude
source share