• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

.preperties file

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing the "Bodgitt and Scarper" assignment,and it mentioned the following about the .properties file :

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.


What is meant by the working directory??
In my applicaition i used suncertify.executer.Runner class to start
the application (either the server or the client).Is the working directory where the main class will reside.
 
Jar Jaquiso
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, the working directory is the directory where the user places the runme.jar file.

Suppose the user places the runme.jar file in /usr/local/SunCertify, then the properties file should be saved in that directory.

As far as I understand...
 
Jar Jaquiso
Greenhorn
Posts: 26
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The assignment says that the user settings must be saved between different runs of the applications.
It also says that the .properties file must be in the current working directory.
If a user changes the directory from where he or she runs the jar file,the current working directory will change and the configuration will not be saved.
I saw the post that your link points to.This post says that create an outstrem of the file.This will create a new file if the file does not exist.If use changes the working directory so much,the settings will not
be saved.
[ October 23, 2006: Message edited by: Khaled Mahmoud ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic