The server gets by running the jar file with the server argument. The client gets run by running the jar file with no argument or in standalone mode by using the alone argument. So in summary, the jar file should contain both the server and the client.
When the user starts with none. It doesn't start the server it just tries to connect to the server and would throw an error if server is not running?
Or does it start the server as well?
Also is the server address always localhost? So is the user unable to run the program from a different machine?
When you start with no command line arg (none), it doesn't start the server. The server should be started in a different JVM using the server arguement. You should not assume that the server address is always going to be localhost. The user should be able to configure the IP address of the server and store this configuration in the suncertify.properties file.
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Yes, you should be able to start the Server on a totally different machine from the Client. Look at it this way, you are developing TWO applications, a Server and a Client, you just have to bundle them together into one application, which is run with 3 different arguments. When you run in standalone mode, you don't want to have anything to do with the Server at all. When you run with no argument, you are just running the Client, which will attempt to connect to the Server using parameters that the User provides (via whatever method you want). When you run with the server argument, you start the Server using parameters that the User provides (again, via whatever method you want).
Again, I recommend you reread your assignment carefully. There should be a requirement that states the Server or Client must be able to run with the same settings on concurrent runs of the application. You don't want the user to have to enter in the same IP/Port/Database file location multiple times if it's the same everytime do you?
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop