I am reading my assignment (the part about deliverables) and it says that
(...)each part (client and server) must be executable using a command of this exact form: java-jar (...)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.(...)This must be called runme.jar
I understood it as the single jar - runme.jar, which can be run in three ways:
- run only server part (networking mode),
- run only client part (networking mode),
- run server + client (non-networking mode).
In Andrew's Monkhouse book I read:
(...)Your project submission must consists of these components:
- An executable JAR file, which will run both the stand-alone client and the network-connected client,
- An executable server-specific JAR file, which will run the networked sever,
- A common JAR file which will contain code common to both client and server applications(...)
Which sounds like you've got to have 3 jar's, but the most important - two different jar's for running networking-mode application and non-networking one.
Is it up to us to decide how many JAR's we'll create? Or maybe Andrew's means that there should be one main runme.jar file which uses the other two jars (but then again - shouldn't these be "non-executable")?
I did it the same way as you understand: one runme.jar that can be run in one of 3 ways.
However, my instructions specifically asked for the assigment to be packaged as two jar files. A jar file within a jar file. And it went on to state how the directories should be in the submission jar file.
I created my submission jar file which was something like scdja-SRxxxxxxx.jar (where SRxxxxxxx is your prometrics id). This jar contained the runme.jar as well as other directories and documents specified in the instructions.