aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Fail in SCJD...HELP! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Fail in SCJD...HELP!" Watch "Fail in SCJD...HELP!" New topic
Author

Fail in SCJD...HELP!

Eric H.Y. Chen
Greenhorn

Joined: Dec 12, 2001
Posts: 20
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!

Eric H.Y. Chen
Gosling Gong
Ranch Hand

Joined: Jun 20, 2002
Posts: 51
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
Greenhorn

Joined: Dec 12, 2001
Posts: 20
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 ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Eric H.Y. Chen
Greenhorn

Joined: Dec 12, 2001
Posts: 20
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???
Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
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
Greenhorn

Joined: Dec 12, 2001
Posts: 20
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 ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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
Eric H.Y. Chen
Greenhorn

Joined: Dec 12, 2001
Posts: 20
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!
Charles Miller
Greenhorn

Joined: Jun 28, 2002
Posts: 19
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).
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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
Eric H.Y. Chen
Greenhorn

Joined: Dec 12, 2001
Posts: 20
I think I was mislead by my friends' design. I will redesign my assignment for resubmission.
Thank you all. Mark, Charles, Holmes, Gosling! Your suggestion make me more clearly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Fail in SCJD...HELP!
 
Similar Threads
command line parameter
choosing operating modes
Layers in SCJD assignment
Question about RMI and Non-network mode
B&S: Mode flag "alone" question