Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

configuration file

Thread view: 
Tomba - 19 Dec 2005 23:24 GMT
Hi,

I'm making an application that would need to save some configurations.
That is, for instance a list of selectable colors in a combobox.

I would like that I can read in several of these files so that they are
complementary.

Could anyone give me a clue where to start with this? What file format
would be a good choice and how can I easily read it out?

Thanks,
Steven
Chris Smith - 20 Dec 2005 01:03 GMT
> I'm making an application that would need to save some configurations.
> That is, for instance a list of selectable colors in a combobox.
[quoted text clipped - 4 lines]
> Could anyone give me a clue where to start with this? What file format
> would be a good choice and how can I easily read it out?

Sounds like you may want to look into the Java Preferences API, which is
found in java.util.prefs.*.  The preferences API doesn't initially store
preferences in any kind of file format, you can import and export the
preferences into a file format.  You can just access the preferences in-
place without building your own data classes or parsing code, and then
easily import and export via XML as needed.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Tomba - 20 Dec 2005 13:13 GMT
>>I'm making an application that would need to save some configurations.
>>That is, for instance a list of selectable colors in a combobox.
[quoted text clipped - 11 lines]
> place without building your own data classes or parsing code, and then
> easily import and export via XML as needed.

well apparently the preferences API store the settings also in registry
or in some system folder. I'd like to only save and load it with XML
Chris Smith - 20 Dec 2005 15:57 GMT
> well apparently the preferences API store the settings also in registry
> or in some system folder.

Yes, that is the case.

Signature

www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

Andrew Thompson - 22 Dec 2005 00:48 GMT
> ...I'd like to only save and load it with XML

Why?  You were first asking about good formats to use,
then you state you want to use XML.  Many would consider
XML to be overkill for a few program preferences.

Signature

Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.