On Thursday 27 March 2008 12:34:50 pm bruehlicke wrote:
> I let let user pick a directory (either via a property or via a file
> selector) than I set the derby.system.home property programtically like
>
> System.setProperty("derby.system.home", dbLocation);
>
> The value of dbLocation when you print it is for ex. C:\Documents and
> Settings\fred\xyz (that is the way you should set the value) but when you
> use the debugger it will of course show up as C:\\Documents and
> Settings\\fred\\xyz
>
> After this value is set I use the URL like jdbc:derby:myDB;create=true
> and the database myDB is created under the given directory.
>
> Hope this helps
> B-)
That would work out well.
On my apps, I usually place the database - and various config files - in a
folder under the user's home folder.
I have line -
File strHomeFolder = new File ( System.getProperty("user.home") + "/.MyApp");
I then append a database folder under this for the database.
In any case, when I'm downgrading to legacy operating systems that still use
drive letters like Wintendo - I have one vista, one Xp and one win2K
machine - I do the followng
jdbc:derby:C:\Path\To\data
HTH!
--
kai
www.filesite.org || www.4thedadz.com || www.perfectreign.com
remember - a turn signal is a statement, not a request