"Your programs must not require use of command line arguments other than the single mode flag, which must be supported. ... 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."
SCJP, SCJD, SCWCD, SCBCD
So, if the user types
- java -jar runme.jar -server
Dispay the GUI for the Server (allow the user to enter port for RMI Registry, possibly enter local db path for the server, any other server configuration items).
- java -jar runme.jar -alone
Display the Client GUI ready to ask local db path
- java -jar runme.jar
Display the Client GUI and ask for the host + port for RMI connection
So if I understand correctly, in all cases the GUI must be displayed and the user must be prompted for connection details. But must the user be prompted for such details? How could Andrew come to these conclusions as using default values much surely be fine and prompting the user is not absolutely necessary. Or is it?
Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.
SCJP, SCJD, SCWCD, SCBCD
SCJP, SCJD, SCWCD, SCBCD
Originally posted by Terry Martinson:
One additional point - I only use the default values if there is not a value already out in the property file. The configuration needs to be persistent between runs of the program, so if the user chooses a value in run 1, that should be the default value for run 2 rather than my original default value.
TJ
Sun Certified Web Component Developer 1.4<br />Sun Certified Java Developer 1.4<br />IBM Certified Associate Developer - WebSphere Studio, V5.0 (285)<br />IBM Certified Specialist - IBM WebSphere Application Server, Adv Single Server Edition for Multiplatforms, V4.0 (158)<br />IBM Certified Solutions Expert - IBM Websphere Studio V4.0 (487)<br />IBM Certified Specialist - IBM Visual Age for Java V4.0 (283)<br />Sun Certified Java Programmer 1.2
Originally posted by Sanjay Joshi:
By "default values", do you mean things like server IP and port, and location of database etc?
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Sun Certified Web Component Developer 1.4<br />Sun Certified Java Developer 1.4<br />IBM Certified Associate Developer - WebSphere Studio, V5.0 (285)<br />IBM Certified Specialist - IBM WebSphere Application Server, Adv Single Server Edition for Multiplatforms, V4.0 (158)<br />IBM Certified Solutions Expert - IBM Websphere Studio V4.0 (487)<br />IBM Certified Specialist - IBM Visual Age for Java V4.0 (283)<br />Sun Certified Java Programmer 1.2
Originally posted by Sanjay Joshi:
One more question. suncertify.properties file is just used for server configuration right? (and not for the client)
Regards, George
SCJP, SCJD, SCWCD, SCBCD
Willie Smits increased rainfall 25% in three years by planting trees. Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
|