File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.<br />(SCJD2)
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17276

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.

Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
I agree. Here's the link:
subject: choosing operating modes
It's not a secret anymore!