This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Format of the command line: [server] or server? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Format of the command line: [server] or server?" Watch "Format of the command line: [server] or server?" New topic
Author

Format of the command line: [server] or server?

Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
plan to upload it tomorrow. But found in spec :
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>]


That means the command line should be like
java -jar c:\runme.jar [server]
or
java -jar c:\runme.jar server

is the bracket necessary? since there is a "must", I am so afraid..
[ May 04, 2005: Message edited by: Zee Ho ]

SCJP 1.4<br />SCWCD 1.3<br />SCJD<br />SCBCD<br />IBM Xml Cert in progress
Olena Golub
Ranch Hand

Joined: Jan 17, 2005
Posts: 113
Hi Zee,

as I know the right way is:

java -jar c:\runme.jar server


Regards
Olena


SCJP 1.4<br />SCJD 1.4 (in progress)
Zee Ho
Ranch Hand

Joined: Jul 20, 2004
Posts: 128
um~~seems you are also in progress. Maybe there is someone who passed it will offer us an answer!! thx in advance.
Frank Hardy
Greenhorn

Joined: Aug 17, 2004
Posts: 13
Hi Zee,

as I know brackets are a common syntax for commandline parameters to describe that a parameter is optional. Like placeholders for specific values which are in "lower-greater than" characters.
As you know: no parameter means to start the network client.

Hope this is a help for you.

Greetz,

Franky.


SCJP 1.4
Ken Boyd
Ranch Hand

Joined: Dec 10, 2003
Posts: 329
1. java -jar c:\tmp\runme.jar server
means indicating the server program must run

2. java -jar c:\tmp\runme.jar alone
indicating standalone mode

3. java -jar c:\tmp\runme.jar
left out entirely in which case the network client and GUI must run.

so you might have three options "server", "alone" or nothing for replacing your [<mode>]
[ May 04, 2005: Message edited by: Nehul Nalekar ]

SCJP, SCWCD, SCBCD, SCJD, BB Java2 and JSP1.1
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Format of the command line: [server] or server?
 
Similar Threads
NX: Mode Flag When Running Program
NX: Passed with 369/400
Properties packaging
Final Packaging "scjda-srXXXXXXX.jar" question!
elp Needed for SCJD Assignment Deliverable