aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes suncertify.properties and database location 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 "suncertify.properties and database location" Watch "suncertify.properties and database location" New topic
Author

suncertify.properties and database location

Macy
Greenhorn

Joined: Oct 28, 2005
Posts: 26
Network Approaches:
Your choice of RMI or serialized objects will not affect your grade, but no other approach is acceptable. In either case, the program must allow the user to specify the location of the database, and it must also accept an indication that a local database is to be used, in which case, the networking must be bypassed entirely.

Deliverables
Target Platform and Execution
...
java -jar <path_and_filename> [<mode>]
Your programs must not require use of command line arguments other than the single mode flag, which muxt 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.
...

Q1: I read some previous forums.
Standalone mode: save the location of the data file.
Network server mode: save the location of the data file and the port number.
Network client mode: save the host and the port number.
Is it correct?

Q2 When first time running the standalone mode, or the network server mode; the user need to specific the location of the data file and the program will save in suncertify.properties.
When running second time, I can load the previous setting. Should I start the application automatically or still give the user an option to change it and click the "start" button?

Q3 If I called the application from c:/folder_a/ and c:/folder_b/, I will have suncertify.properties in both folders since this file save in current working directory?

Q4 Once the application is running, these properties cannot be changed until stop and restarting?

I just want to double check and make sure I understand the requirement correctly. Thanks for your help.


Macy Wong<br />SCJP 1.4 & 5.0, SCJD, SCWCD, SCBCD, Oracle PL/SQL OCA
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11280
    
  59

Hi Meisze,
Q1: I read some previous forums.
Standalone mode: save the location of the data file.
Network server mode: save the location of the data file and the port number.
Network client mode: save the host and the port number.
Is it correct?
Yes, however you may not need to save the port number: Personally I think that having the port number configurable is a great idea, but it is not strictly a requirement of the assignment.
Q2 When first time running the standalone mode, or the network server mode; the user need to specific the location of the data file and the program will save in suncertify.properties.
When running second time, I can load the previous setting. Should I start the application automatically or still give the user an option to change it and click the "start" button?
If you start automatically the user wont have any way to change the parameters if necessary except by finding and deleting the properties file - not a very user friendly option. So I would give the user the option to change any parameters if necessary.
Q3 If I called the application from c:/folder_a/ and c:/folder_b/, I will have suncertify.properties in both folders since this file save in current working directory?
Correct.
Q4 Once the application is running, these properties cannot be changed until stop and restarting?
Correct.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
Consider Paul's rocket mass heater.
 
subject: suncertify.properties and database location
 
Similar Threads
suncertify.properties question
Database location and properties file doubts.
Database location
B&S: Persistent Settings
NX: About the db file