This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have some questions about submission and startup of the client and server.
As I understand my assignment correctly I need to make only one jar and call it runme.jar. In this jahr I should pack all documentations, client.jar and server.jar. How my client or server will be started by examiner? Does he/she unpack the runme.jar? And will start server in this way:
and the client in this way:
Or will the application-parts be started directly from runme.jar? Something like this:
I am thinking now to create the startup-class for client and server and I have some doubts.
if the server and client will be started from server.jar or client.jar corresponding: Do I need two startup class (a class with main-Method): one for startup of the client and the another one for startup of the server? One will be zipped in server.jar and the another one in client.jar. �r should I make only one startup-class that starts server, or remote client, or standalone and put it twice one in these jars?
If the application will be started from runme.jar: I will create one startup-class and put it in one of the both jars? How do you think what is correct way to do this?
Both server and client are directly started from runme.jar. So they both share the same start-up class and runme.jar is not decompressed.
As pointed out above, this is described precisely in your instructions and perhaps slightly more comprehensible in the Kathy&Bert book. You might want to read these until you are completely sure you have understood it, because making a mistake here will lead to auto-failure.
Note that your final submission is also a jar file. This jar file is not executable and will be decompressed by the assessor. It contains runme.jar and your documentation files. Your documentation files should not be included in runme.jar (except maybe for any online help files).
I was also confused by the runme.jar file until, as recommended by Jeff and Frans, I read the pertinent sections in the K&B book.
I can tell you that an easy way to do this is to assign the job of instantiating and initializing the required objects, which will vary depending on the mode the application is starting in, to some kind of factory class that specializes in starting the application.