I'm bit confused with this statement. "
The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.
Am I right on these?
1. We will be using same runme.jar to launch the application for three different mode(way) like one as server alone, and another as client alone and another one as client-cum-server (means process will do all the jobs)?
2. Just to check; when we pass,
a) "server" -> Only network server program should run - we have to launch client program separately using same runme.jar by not specifying anything in the mode flag; just by leaving it blank (either from different or same machine).
b) "alone" -> this type of launch will do both server side jobs as well as clients side jobs (means directly accessing DB file)
c) left blank -> Only network client program should run (i.e., GUI alone). Server must be started separately.
Thanks in advance,
the same jar (runme.jar) is used to run the application in 3 different modes (depending on a single argument):
Follow up question: How to handle the situation where this is a first execution of the program (which means no properties file yet exists) and no argument is passed. If both the server and client apps are to startup (the client being in network mode), should we force the server to come up first before allowing the user to make use of the client gui?
It's not necessary. It's all upto us how we want the things to be working. In my case, no matters server is already started or not, client (networked) can be launched and run. I allow the user to change the server's ipaddress and port details while it's running. So the only time when the user wants to search (& Reserve) only, I need to connect to the server to get (reserve) the details. Rest of the time, it just can simply run. No matters whether server got crashed. This option also enable the user to connect to the different server (by specifying ipaddress and port).
Ed Ward wrote:If both the server and client apps are to startup (the client being in network mode), should we force the server to come up first before allowing the user to make use of the client gui?
How are you planning to force the startup of a jar on any random computer (ip unknown to you) in the company network?
Your network client just starts, dialog shows, user enters configuration settings (ip + port) and if no server application is found a message wille be shown: "server not running"