wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Questions on suncertify.properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Questions on suncertify.properties" Watch "Questions on suncertify.properties" New topic
Author

Questions on suncertify.properties

Thomas Paul Bigbee
Ranch Hand

Joined: Jun 28, 2005
Posts: 71
Well, folks, I've got all my docs, and help files done, now I going thru the MUSTs, to make sure that, each and every one is satisfied before shipping the assignment off.


Your programs must not require use of command line arguments other than the single mode flag, which must be supported. Your programs must not require use of command line property specifications. All configuration must be done via a GUI, and must be persistent between runs of the program. Such configuration information must be stored in a file called suncertify.properties which must be located in the current working directory.


I have a file called suncertify.properties, it is in the base directory of runme.zip, this file is used when the Server is run, it holds the Port Number and Database Loacation, I'm assuming that the current working directory for the Server is where the jar is located.

Question, am I correct in this assumption, and is this a good approach?


As I understand it, besides the Server Configuration, there are two others that need to be taken into account...

1) Stand-Alone (the location of the db)

2) Network-Client (the IP address and Port Number of the Server)

I'm assuming that the current working directory for either one of these two Client Modes would be where ever the current DOS (Console) Window is open at.

Question, am I correct in this assumption, and does it matter that, if the user opens a Console Window in many different Directories, they will have lots of different suncertify.properties files sprinkled thru their System?


My Stand-Alone and Network-Client Property Files are going to be combined into one file, that way, a user could do Stand-Alone, pick the DB File, exit do Network-Client, pick the IP and Port, exit, do Stand-Alone and have the DB File already defaulted.

What I'm getting at here is that there would be two sets of suncertify.properties files, one in the zip (Server) and one in the Working Directory (Both Clients)

Any feedback on the above approach would be appreciated
John Covarrulios
Greenhorn

Joined: Sep 12, 2005
Posts: 2
I saved three items:

* TCPPort (Client, Server)
* ServerIP (Client)
* LocalDBPathname (Server,Standalone)

The application's run mode determines which are available/applicable.

The .properties file is saved in the current working directory: therefore, it is entirely possible to have several of these files floating around in different locations.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11437
    
  85

Hi Thomas
I have a file called suncertify.properties, it is in the base directory of runme.zip, this file is used when the Server is run, it holds the Port Number and Database Loacation, I'm assuming that the current working directory for the Server is where the jar is located.

Question, am I correct in this assumption, and is this a good approach?
I dont understand why you have assumed this for the server, but not for the client. I would assume that both the server and client can be started from any directory. So you would have to have some way of handling the case where the server is started in a directory where there is no properties file.

I have worked on high availability systems where it was mandatory to have separate directories for each of executables, config files, log files, data files, and documentation. So assuming the config file would be with the executable was not an option.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Questions on suncertify.properties