Re: File IO -- Reading Config Files Easily



Hal Vaughan wrote:

I remember somewhere I saw a Java program that had a config file with
name/value pairs like:

alpha=one
beta=two
gamma=three

The programmer was using something in the Java API to easily read this in
and use the value pairs for setting variables, or maybe for setting values
in something like a HashMap or Vector.  I can't remember what he used or
what it was called, but it was a basic shortcut from having to read the
file line by line, split each line on the "=", and parse the results.

Any help on what would do this or what to call it?

Thanks, everyone for the responses.  Yes, it's java.util.properties, and
thanks, Roedy, for the link.  Your page has bailed me out many times and
the effort to create it is much appreciated.

In this case, I couldn't remember a thing about what it was, so I wasn't
even sure what to Google for.  Config file?  File Input?  Settings?
Values?

The help is appreciated!

Hal
.