Q.1 If user is starting application in standalone mode and when he has to specify the database file location , let say if user does not specify the database file location file properly then should we give Alert message "Please specify the database file"?
Our application should be designed only for the database file given to us (specific to our assignment)?
Let say if user specify other file that also ends with .db(but not the database file whatever Sun has given) then still should we give aler message "Please specify the database file" ?
or our application should be designed for all the database file those have extension .db ?
JVM In standalone mode can we run more than one instance of application (ApplicationRunner which is starting point to start the applicaton )on one JVM ?
Partner, for Q1, here's what I did: when the user provides the database location in standalone mode, the first thing that I do is verify if the given file exists; if so, I proceed and verify if the given file has the right "magic cookie". So you end up having to make assumptions here. For instance, I assumed that the right database file must have the same magic cookie value as the one present in the database that was provided to me, but I already saw some people that ignored this value. If the magic cookie value present in the given file matches the magic cookie value of the database that was provided to me, then everything proceeds normally, otherwise, I show a message dialog, informing that the provided database is invalid. And I chose to hardcode this value, so I could verify it every time the application starts.
For the other question, I assumed that only one instance of the application would be running at a time.
Q1. you should be able to process each valid database-file. So i let user choose any *.db file and if that's a valid file (not empty, correct magic cookie, readible file, writable file,...) server or standalone client will start. otherwise error message is shown.
Q2. my instructions clearly tell me
You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server.
 I see that i was beaten in speed by Axel and Roberto