This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes path to db.db file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "path to db.db file" Watch "path to db.db file" New topic
Author

path to db.db file

Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Hi,
Something pretty basic but real important-
Can I expect that the user will type in the full database path name for both server and client?
Ofcourse, in remotemode server needs it and in local mode client needs it.
I don't have to include db.db in the client/server jar files, do I?
Thanks much,
Aruna.


Aruna A. Raghavan<br />SCJP, SCJD, SCWCD
Bernhard Woditschka
Ranch Hand

Joined: Sep 16, 2002
Posts: 89
You don't have to put the db.db file in the client.jar or server.jar.
A place commonly used is the folder where the client.jar and server.jar are. Then you can ommit the full path when using a command line like:
java -jar client.jar db.db
bern
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

Can I expect that the user will type in the full database path name for both server and client?

When database is accessed locally, the user is expected to specify the database location (full path, including the database name). When database is accessed remotely, the user specifies the server name, port, and database name, but not the path. The server itself should know where the database files are.
Eugene.
Aruna Raghavan
Ranch Hand

Joined: May 14, 2002
Posts: 194
Eugene,
Yes. But when the server is started, on the command line the path to db.db should be specified by the admin. I realize that the remote client does not have to provide it, correct?
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937

But when the server is started, on the command line the path to db.db should be specified by the admin.

The best thing to do is to avoid setting the path on the command line. Instead, you could require in your instructions that db.db file should be located in the same directory as your server.jar file.
Eugene.
 
wood burning stoves
 
subject: path to db.db file
 
Similar Threads
Policy file question and readme question
should there be 2 "db.db" files
Submission of assignment
whether db.db should be a part of server.jar ?
Seperate javadoc for client and server