How to deploy a Java Swing application with an embedded JavaDB database?

Posted by Jonas on Stack Overflow See other posts from Stack Overflow or by Jonas
Published on 2010-05-29T13:38:00Z Indexed on 2010/05/29 13:42 UTC
Read the original article Hit count: 255

I have implemented an Java Swing application that uses an embedded JavaDB database. The database need to be stored somewhere and the database tables need to be created at the first run. What is the preferred way to do these procedures?

Should I always create the database in the local directory, and first check if the database file exist, and if it doesn't exist let the user create the tables (or at least show a message that the tables will be created).

Or should I let the user choose a path? but then I have to save the path somewhere. Should I save the path with Preferences.systemRoot();, and check if that variable is set on startup?

If the user choses a path and save it in the Preferences, can I get any problems with user permissions? or should it be safe wherever the user store the database? Or how do I handle this?

Any other suggestions for this procedure?

© Stack Overflow or respective owner

Related posts about java

Related posts about deployment