I wonder, for those people who got older (I presume) assignments with separate .jar files for client and server, did you have a requirement that things were supposed to run in standalone mode? Yes, same requirement: the client should work in a networked mode and the non-networked mode. The switch from one mode to another could be made either dynamically (while the client is running), or at the start (using a parameter indicating the desired mode). I would also note that the requirement didn't "contain" separate jar files, nor did it prescribe using separate jars. It's just most people had enough common sense to break it in that manner.
For the newer requirements posted as
When you submit your assignment, each part (client and server) must be executable using a command of this exact form:
java -jar <path_and_filename> [<mode>]
I still don't see where runMe.jar comes from. Unless you have some additional requirements, that quote above tells me that they just want to see both client and server started from
a jar, and the only allowed parameter is the "mode". In the old days, the folks used to submit their solutions where they would pass all sorts of junk on the command line (such as RMI security manager settings, timeout settings for lock() (don't ask me why), locations of databases, property file locations, etc.). Some didn't even bother to package their app to a JAR and required the grader to set the classpath. Sun obviously got tired with that nonsense and thus the above requirement.
However, I don't think that it implies that both client and server must run from the
same jar. In fact, why would anyone deploy the server code on the client machine (except possibly for the RMI stubs)? It's just a waste of space and bandwidth, not to mention the potential security issues (client mangling the server code). And if that's not convincing, consider this: suppose you distributed your program to all the remote clients. Now you decide to update the server code (without changing any of the interfaces). What are you going to do -- burn the CDs and ship 'em to your 10,000 clients, or send them a notice: "Please download and install our server code to your client machine, or you are toast"? Redefines the term "thick client", doesn't it?
Perhaps you are planning to have
three jars: server.jar (distributed to the servers), client.jar (distributed to the clients), and runMe.jar (distributed to both, serving as a getaway). That would be a little better than packaging everything together, but I still don't like it.
I suspect that this runMe.jar is just a recent fashion.
SCJD forum frequently goes through those waves.
[ June 09, 2005: Message edited by: John Smith ]