This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Help needed with submission Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Help needed with submission" Watch "Help needed with submission" New topic
Author

Help needed with submission

Ben Zung
Greenhorn

Joined: Sep 16, 2004
Posts: 8
I have long been confused by the following requirement:
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>]
Your programs must not require use of command line arguments other than the single mode flag, which must be supported


My question:

1. Will I need two jar files, one for server classes and one for client classes?
2. With server jar file, the "server" argument will start the (RMI)server and the client? and the "alone" argument will just start the client? (it could work, but sounded weird to me)
2. With client jar file, the "server" argument will start the server first and then the client?(again, it could work but again it sounded weird). And the "alone" argument will start the client only?

Please clarify. Or redirect me if there were talks about this already.

Thanks.

BW
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Ben wung:
My question:

1. Will I need two jar files, one for server classes and one for client classes?
2. With server jar file, the "server" argument will start the (RMI)server and the client? and the "alone" argument will just start the client? (it could work, but sounded weird to me)
2. With client jar file, the "server" argument will start the server first and then the client?(again, it could work but again it sounded weird). And the "alone" argument will start the client only?

Please clarify. Or redirect me if there were talks about this already.

Thanks.

BW


You need to submit one jar file that contains all you classes. Your instructions may specify the name eg. runme.jar

1) You should be able to run the client by a command like
java -jar runme.jar

2) if you want to run the client in standalone mode you would use a command like
java -jar runme.jar alone

3) if you want to run the server you would use a command like
java -jar runme.jar server

The client mode (1. no mode argument) only runs the client that must get its data from a server.

The standalone mode (2. alone) runs the client with an internal database access system that does not require a server.

The server mode (3. server) runs just the server and waits for connections from clients using whichever object transport you chose (sockets or RMI).
Ben Zung
Greenhorn

Joined: Sep 16, 2004
Posts: 8
Thanks Peter.
1) You should be able to run the client by a command like
java -jar runme.jar

Oh, Gosh. I had read it wrong the whole time!!! I had thought without an argument, the server should run. Gee, thanks.
Here is what the specs says this if there is no argument:
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


2) if you want to run the client in standalone mode you would use a command like
java -jar runme.jar alone

Thanks, I am clear with this one.

3) if you want to run the server you would use a command like
java -jar runme.jar server

Should the client/GUI be started after the server is started with this single command? If not, should I provide another jar file (client only) for the graders to start it?

Thanks.
BW
peter wooster
Ranch Hand

Joined: Jun 13, 2004
Posts: 1033
Originally posted by Ben wung:
Thanks Peter.

Should the client/GUI be started after the server is started with this single command? If not, should I provide another jar file (client only) for the graders to start it?

Thanks.
BW


No, just a single .jar file. It should support the 3 modes specified. The client must be started seperately after the server, but from the same jar but with a different mode parameter.

Sun should really provide these instruction in non-english form, at least in the most common languages such as French, Spanish, Chinese and Hindi. They are difficult enough for people like me with English as their first language.
Ben Zung
Greenhorn

Joined: Sep 16, 2004
Posts: 8
Sun should really provide these instruction in non-english form, at least in the most common languages such as French, Spanish, Chinese and Hindi. They are difficult enough for people like me with English as their first language


Thanks. Heartfully agree.

BW
 
jQuery in Action, 2nd edition
 
subject: Help needed with submission
 
Similar Threads
NX Contractor - startup mode
[NX Contractor] Package and run application
Final Questions
Submission jar file / files?
NX:Contractors: Structure of package