I got the comments from Sun's CertManager website: -------------------- Instructions (README.txt) do not explain how to run client in non-networked mode. Documented command line requires hostname and port # of RMI server. In non-networked mode there is no RMI server. -------------------- In my design, I use only one command line in both local and network mode to run client program. After the client program is started, user can choose the connection mode by menubar. In this case, all arguments are needed in command line, including RMI host, RMI port #, path of dbfile. The comments seems that I cannot use RMI related arguments when non-networked mode is used. I think this is the issues of design. No limitations about that I have to run different mode with different command in instructions file.
Any suggestions or idea? This makes me confused... Thanks in advance!
did they give you score? maybe you should contact sun guys to clarify this issue, i saw a guy failed first but after contacting sun, he passed. by the way, why all arguments are needed in command line, including RMI host, RMI port #, path of dbfile? you mean you didn't let user configure such parameter when they select mode from GUI? why not provid a dialog for user to configure the mode?
Eric H.Y. Chen
posted 18 years ago
Yes, Grade 'F' with score '0' After my client program started, the connection is not established yet. The user can choose different connection mode from menubar. Also they can change mode at any time just disconnect current connection. The user didn't specify the connection mode in command line in my assignment but in the window. So all the arguments are needed for client initialization. The reason of this design is that user can change mode without stopping the application. Maybe most of examer design this application with other approach, such as never provide changing mode in this application. This flexibility of my assignment causes my failure! That's ridiculous!!! Maybe I must follow some undocument rules to get this cert! I contacted with the grader to explain my design choice and wait for reply. Good luck to me! [ July 03, 2002: Message edited by: Eric H.Y. Chen ]
In local mode there is no RMI at all and no IP address to pass. So therefore it should be a different command line. Or jsut a command line without needing to pass any of those arguments. If in local mode you start up the server, then that is incorrect. It should be like this Local Mode java -jar client.jar Remote Mode java -jar client.jar 192.168.1.1 Now you can have more on the command line like policy file if needed, but for local especially, you won't need any of that. Hope that helps you clear it up. Mark
Thanks for your reply, Mark. I can understand the viewpoint of your design. Maybe my geek design causes me failed. But I'm still confused with that two of my friends are passed with the same design last month. why???
Hi, I am not sure what your real problem is. In my design, the user can specify connection mode in GUI. So, my design is similar to yours. If the user chooses "Local", then no server start-up needed; if she chooses "Remote", then she must start up server first. I use the default port. No commands needed except: java -jar client.jar, and java -jar server.jar. Why do you still need any comand line arguments after the user starts GUI?
Eric H.Y. Chen
posted 18 years ago
Thanks, Holme! The command line I use is to launch the client GUI program. Then user can choose different mode by menubar. The steps of my assignment is following: 1. type command line to start the client GUI program. 2. Choose[Connect...] on menubar, then prompt a dialog box to request mode selection. 3. After that, connect to the specified db. Because i cannot expect which mode the user will choose in GUI window, I need all arguments in command line, including RMI host, port #, and path of dbfile to prepare initialization. Any ideas?
Eric [ July 03, 2002: Message edited by: Eric H.Y. Chen ]
Eric you need to remove that from your local mode. You need to change the way you think here. If I am in local mode, I have no IP address to give, so now I am stuck. You have to use the args that gets passed in from the command line, and if it is empty you know you are in local mode. Please do not require the user to have to type in an IP address, if they are in local mode. As long as you force them to enter that, you will not pass. Mark
Thanks again, Mark! I think the Sun grader didn't agree with my design because combine local and network together. You're right! That's very interesting that two of my friends passed last month with the same design approach....... It depends on fate... Anyway, thanks you again!
My design allows the user to select the mode from inside the application (GUI). There are NO command line parameters for starting the GUI (other than some -D parameters for the java executable). Once the user is in the GUI, he must open a connection. If a 'Local' connection is chosen, the user is allowed to browse (FileChooser) for the database file. If the user chooses a 'Remote' connection, a dialog gathers the RMI host and port and connects that way. To accomplish that, the GUI relies on a DataBroker (interface) and a DataBrokerFactory (which provides either a LocalDataBroker or RemoteDataBroker).
As you can see from some of the other posts, what they are saying is it is fine to have the GUI choose which mode, but your command line is the problem. Maybe your friends didn't require the command lines in local mode. If the user in you GUI decides to go Remote, you could have a screen that pops up asking for the IP address and such there, rather than in the command line. Good Luck Mark