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 Startup modes 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 "Startup modes" Watch "Startup modes" New topic
Author

Startup modes

Dannie Kjeldgaard
Greenhorn

Joined: Oct 02, 2006
Posts: 7
Hello!

I have searched the old topics for answers, but didnt find any.

I am not sure I understand to startup modes that has to be chosen. The assignment says:

"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."

So as I understand them:

"server": starts up the server (rmiregister and db-file stuff etc, making it ready for a client to look it up and use it

"alone" : starts up the GUI in non-networked mode. That is start up a full application bypassing the network-code.

"" : starts up the GUI in networked mode. That is start up the network, server and client.


If thats correct, what is the idea of the "server" mode? As I see it, there is no mode to start the client only? If starting the client should be the "alone" mode, howto start the GUI in non-networked mode?

Best regards
Dannie
Chulwoo Choi
Ranch Hand

Joined: Apr 11, 2005
Posts: 65
no argument starts up the networked client and this client connects to a server that is already running somewhere in the network. i.e., no argument does not start the server.

Chulwoo
Dannie Kjeldgaard
Greenhorn

Joined: Oct 02, 2006
Posts: 7
Hello!

Thank you - as far as I understand, it makes sence. What tricked me was the senence:

"left out entirely, in which case the network client and gui must run."

I understood it as if the "must" indicated that you had to start up the network, client and gui (notice the extra comma making it start up everything!).

To make sure I understand it the modes should:

"server" starts up the server and register it withothe rmiregistry.

"client" starts up a client. Asking for the URL in a dialogbox (default to URL in suncertify.properties), and connects to a server already started in "server" mode. If it cant connect to the server, a warning is launched.

"[no argument]" starts up the client with no RMI stuff at all, launching a dialogbox asking for the location of the db-file in the filesystem.


Did I get it right?

Greetings
Dannie
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
no, you got it wrong.

Read your assignment document. Where does it talk about a "client" flag?
It's not hard at all, but you do have to read.

If you supply NO flag, your network CLIENT starts.
If you supply the "server" flag, your network SERVER starts.
If you supply the "alone" flag, the client starts with NO network support.


42
Dannie Kjeldgaard
Greenhorn

Joined: Oct 02, 2006
Posts: 7
Hello!

Thank you - as far as I understand, it makes sence. What tricked me was the senence:

"left out entirely, in which case the network client and gui must run."

I understood it as if the "must" indicated that you had to start up the network, client and gui (notice the extra comma making it start up everything!).

To make sure I understand it the modes should:

"server" starts up the server and register it withothe rmiregistry.

"client" starts up a client. Asking for the URL in a dialogbox (default to URL in suncertify.properties), and connects to a server already started in "server" mode. If it cant connect to the server, a warning is launched.

"[no argument]" starts up the client with no RMI stuff at all, launching a dialogbox asking for the location of the db-file in the filesystem.


Did I get it right?

Greetings
Dannie
Dannie Kjeldgaard
Greenhorn

Joined: Oct 02, 2006
Posts: 7
Woops - got my question reposted - dont know how.

"client" mode was a typo. Was ment to be "alone". Is it correct with that correction?

-- Dannie
 
jQuery in Action, 2nd edition
 
subject: Startup modes
 
Similar Threads
B&S: Mode flag "alone" question
[NX Contractor] Package and run application
command line parameter
commandline argument
How many modes are there for the program?