Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes choosing operating modes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "choosing operating modes" Watch "choosing operating modes" New topic
Author

choosing operating modes

Charles Dupin
Ranch Hand

Joined: Oct 18, 2002
Posts: 94
My instruction.html says "Additionally, the program must be able to work in a non-networked mode. In this mode, the database and user interface run in the same VM and no networking is performed, and no sockets should be created. The user must be able to select the operating mode, although it is acceptable that the program stay in one mode once it has started up."

Is it acceptable that the user choose the operating mode with the command line used to start the client?
In my design the user can pass a server ort name as parameter or nothing. In both cases if the RMI lookup finds no link to the remte server or localhost server it starts in local non-RMI mode. The command line makes the difference.
Kind regards
Charles.


Charles.<br />(SCJD2)
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17250
    
    6

For my submission the command line is what determines the operating mode.
java -jar client.jar for local mode
java -jar client.jar <<server address>> for remote mode.
Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: choosing operating modes