• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

nx:All of URLy Bird 1.1.3 about suncertify.properties JFrame and JDialog

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:George and Andrew and other experts.

the instruction say.


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.



1.My question is the mean of the bold font.Whether its mean is All configuration must be done via a GUI,and All configuration must be persistent between runs of the program.

2.If yes.i will create FileInputStream and FileOutputStream and use System.getProperty("user.dir") and Property class.then load and store the
suncertify.properties file.Whether my method is right?

3.for "persistent" whether its meaning that it must not be changed between
runs of program?

4.From instruction of sun.I will create JDialog object to store and load
suncertify.properties file.but only after the finishing of store file and restart the program,the suncertify.properties can take effect.Is this right?
whether you have other method to do this?
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


1.My question is the mean of the bold font.Whether its mean is All configuration must be done via a GUI,and All configuration must be persistent between runs of the program.


YES. That is to say, when you start the client (or server), you need to provide a GUI for the users to specify which server (IP and Port) to connect with, for networked mode, or which data file (physical file location of the harddisk) should be used, for non-networked mode.

That is to say, since the system can be in 2 modes: network or non-network. If the system currently is networked, you cannot change it to non-network, without restarting the system.


2.If yes.i will create FileInputStream and FileOutputStream and use System.getProperty("user.dir") and Property class.then load and store the
suncertify.properties file.Whether my method is right?


You need to make use of the property file to store the configuration, as required by the instructions.

If it is the first time the user runs the program, you simply return nothing. But if he runs before, and, for example, specify that he connects to server 10.14.222.11 and port 10000, then you need to save these info, and display the previous configuration to him when he runs the system next time.


3.for "persistent" whether its meaning that it must not be changed between
runs of program?


YES. The user cannot change the mode of the system from *standalone* to *network* without restarting the system.


4.From instruction of sun.I will create JDialog object to store and load
suncertify.properties file.but only after the finishing of store file and restart the program,the suncertify.properties can take effect.Is this right?
whether you have other method to do this?


Exactly. I saved the connection info when the user clicks *ok* button in the JDialog box. So, even the system hangs or errors on connection, the info is saved.

Nick
 
liqun chang
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi:Nicholas thanks for your suggestion.but however i have question.

1.I will create JDialog that has button1(connect) button2(save),field1(host)
field2(port) for network client.

a. When i start the program,the JDialog load the suncertify.properties file to JDialog,if i click button1(connect) then
connect to default host and port(previous saved in suncertify.properties).


b. if i click the button2(save) then will save the configuration to suncertify.properties,when i restart the program use the previous configuration.

c. In the same time if i enter host in field1 and enter port in field2 then click the button1(connect),then i will connect to the new host and port.

Whether my mention is right? please you help me.

2. Or i create JDialog that has loadButton,saveButton,hostField,portField.
when start program it must be load the previous configuration through suncertify.properties file that saved int the disk.If i save the new configuration ,the program must be restarted for using the configuration.
Is this right?
[ May 20, 2004: Message edited by: liqun chang ]
 
Danger, 10,000 volts, very electic .... tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic