• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

BETA Properties file

 
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Your programs must not require use of command line arguments other other that the single mode flag, and must not require use of command line property specifications. All cinfiguration must be done via GUI and be persistent between runs of the program


Does this mean that I have to create a GUI Dialog for modifying the property file? If so, I guess I should assume a GUI should be created for the server's property file also.
 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have anyone created a GUI to modify the properties file? I am
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashik, I am also creating a UI to modify the file. This UI will be displayed before the server or GUI is launched and it will also be responsible for setting the System properties. I wasn't sure if I should do this at first but after I read the requirement that says "You must not require any manual editing of files" I decided to go ahead and create the GUI.
 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What configurations are there? Is it for RMI? I use sockets so I don't have any configurations. However, I save the window size and column widths of the table in the suncertify.configuration file. Anyways I think this the configuration file is optional. If you have any configuration, it must be done in the GUI and saved in the configuration file, but it doesn't mean you need to have any configuration at all or what the configurations are.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was thinking that I would ahve a GUI that starts up in the client where they select local or remote mode, and then have a remote IP JTextBox and also a JTextbox for db.db location with a Browse button, and whatever they enter in this screen is saved to a properties file, so that the next time they start up the client these entries would re-appear int he corresponding places.
That is if I can find the time to work on my assignment.
Mark
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:
I was thinking that I would ahve a GUI that starts up in the client where they select local or remote mode, and then have a remote IP JTextBox and also a JTextbox for db.db location with a Browse button, and whatever they enter in this screen is saved to a properties file, so that the next time they start up the client these entries would re-appear int he corresponding places.
That is if I can find the time to work on my assignment.
Mark


That's exactly what I did except that I only let the user choose between non-networked and networked mode and in the latter case, the user must enter the server IP and port... I do not let the user browse for the DB file since the DB file name is frozen to "db.db"... But wait, it could well be that the user has several db.db files on his file system... Hmmmhm, maybe I should add that, too... wondering now :roll:
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

That's exactly what I did except that I only let the user choose between non-networked and networked mode and in the latter case, the user must enter the server IP and port... I do not let the user browse for the DB file since the DB file name is frozen to "db.db"... But wait, it could well be that the user has several db.db files on his file system... Hmmmhm, maybe I should add that, too... wondering now


I'm taking the beta exam and the exam stated that local or remote mode should be specified when executing the runme.jar file. This is why I didn't implement this functionality in the configuration GUI.

The mode flag must be either "server", indicating the server program must run, "alone", indicating standalone mode, or left out entirely, in which case the network client and gui must run.


Also I don't plan to implement a browse button for selecting db.db because the database file, as stated in the requirements, must be in the root directory of the jar file. The only configurations I implemented in the configuration GUI is the port number, server url, and the name of the database.
I think the location of the db.db, suncertify.properties file, and other files is specified to make things easier for the graders to find. Also, this can hurt someone if they neglect the file seperator because there application will not be platform independent.
What do you guys think?
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way...I am using RMI :-)
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nah a Browse button isn't necessary, and yes the command line should tell whether to be local or remote. So I guess the only thing to save then would be the IP address if in remote. Anything else anyone can think of.
Mark
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If maintaining configuration parameters is an objective, why not look at the Preferences mechanism that is available in JDK 1.4 and above. The "Java 1.4 Tutorial" by Gregory Travis has an excellent overview of its' capabilities which I highly recommend.
 
Valentin Crettaz
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would be inclined to use java.util.Properties class instead of the Preferences API. It is much more easier to use, and moreover, if we will only be storing 2 or 3 properties there is no need to use the "complex" Preferences API.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic