Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

path to db.db file

 
Aruna Raghavan
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic