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 property file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "property file" Watch "property file" New topic

property file

Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
It is a silly question, but where do we get the initial property file. Also, what information is it supposed to store. It also says that the information needs to be persisted between runs.

One thing possible is to create the property file when the app is started for the first time (which would be platform specific).

I dont think it is right that you store this file in the jar file itself.
Jan van Buren

Joined: Dec 04, 2005
Posts: 6

Implemented the following:
If property-file is not available on current working-directory it is the first time the application is used. That means nothing persistent is available yet and the user get empty-fields in the GUI. Otherwise the user gets the stored propertys.
Stored propertys are serverName(for a remote client), databaseFileName (for standalone and server implementation).
Don't assume the file is available. It can be a reason for failure.
Aruneesh Salhotra
Ranch Hand

Joined: May 12, 2004
Posts: 167
Continuing this,
depending on the DB file name, you should it be displayed to the user.

1. local DB file
2. RMI based DB file

Also, for testing the RMI based structure, does it have to work on the same system. Also for the port that RMI uses, is that supposed to be configurable.

Also, if RMI is being used, should there be two JVMs spawned, or there should be two threads of action.
subject: property file
It's not a secret anymore!