One jar. You must point to a class that can differentiate between your command line arguments and start the application in the correct mode.
Joined: Dec 07, 2004
Originally posted by Vince Cheung: Should I put all classes(server and client) in a jar file or in two jar files(one is server and one is client)??
The instructions state that the entire application should be in a single file named runme.jar (not suncertify.jar! but check your instructions file to be sure).
Originally posted by Vince Cheung: I have tried to put all classes in a jar file. But I can't start by two commond down. java -jar suncertify.jar server (Starting Server) java -jar suncertify.jar client (Starting Client)
I can only start one of two classes(Server, Client)
How can I do, please give me some help, thanks
Take a look at the signature of the main method:
The key is in the "args" parameter. This will contain anything you type when starting the program (in this case: server or client).