• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Has anyone failed because of that?

 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a question regarding the parameters supplied to the client.
What is the preferred way to select between local and network mode?
1) java -jar client.jar db.db
java -jar client.jar locahost 11099
or
2) java -jar client.jar db.db localhost 11099
select the mode in the gui (e.g. Dialog on startup)
Bern
[ January 13, 2003: Message edited by: Bernhard Woditschka ]
 
John Smith
Ranch Hand
Posts: 2937
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I think the simplest (and therefore the best) way to do it is:
java -jar client.jar (for both local and remote modes).
However, you will not be penalized if you have 2 different ways of starting the client, one for local mode, one for remote mode. Just make sure that when you start it in local mode, you don't require the server name and port.
Eugene.
 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid that's what i did allthough i dont use this information in local mode .
The commandline requires to have both db file and servername and port.
Then the first thing th user sees is a modal dialog to select bvetween local and network mode (no sockets created in local mode)
Has anyone failed because of that?
Bern
[ January 13, 2003: Message edited by: Bernhard Woditschka ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way you can fail on the command lines is if the command line argument you ask for them to use is not in the acceptable list of command line arguments given in the instructions.html
In my submission the only argument ever given is if the client is to be in remote mode, and the argument is just the server address. In my DataAccessFactory I check to see if there is any command line argument given. If there is then I know to be in remote mode and get the DataAccess class I need from the server, otherwise it is in local mode.
But how you do it is completely up to you. I always liked the startup screen that asks your mode and if you chose remote a JTextField has you enter the server address and anything else you might need.
Mark
 
Bernhard Woditschka
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mark and Eugene,
I guess I just get nervous now waiting for the results...
Bern
[ January 14, 2003: Message edited by: Bernhard Woditschka ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic