[ale] OT: Java application properties

Joe jknapka at earthlink.net
Thu Feb 6 15:29:42 EST 2003


Arafat Mohamed <amohamed at lallygag.net> writes:

> Joe wrote:
> > Arafat Mohamed <amohamed at lallygag.net> writes:
> >
> >><snip>
> >>Joe wrote:
> >>
> >>>Hi folks,
> >>>Various Java documentation seems to imply that for a given
> >>>Java executable class MyClass, one can create a property
> >>>file with a magic name, such that the JVM will automatically
> >>>read that property file and add the properties therein to
> >>>the System properties, when MyClass's main() is invoked.
> >>>Is this true? If so, what is the required name and location
> >>>of the magic application property file? I'd expect it to
> >>>be something like "MyClass.properties", but I can't seem to
> >>>track down any solid documentation on this (which probably
> >>>means that it's in a totally obvious place I haven't thought
> >>>of looking yet...)
> >>
> >
> As far as I know, no. The closest thing I've seen to what you're
> talking about is the use of ResourceBundles. You still have to load
> the class, but it figures out on it's own which bundle to actually use.
> 
> Could you provide an example of the documentation that implies this is
> possible?

Lots of stuff in the j2sdk documentation mentions the phrase
"application property file". I think the reason I thought that was a
standard, supported, automatic thing is that back when I started
writing Java code, back in JDK1.0 days, a guy at my company had
written a utility class that handled loading application properties
"by magic", and I used it without thinking much about it. It's been a
while, and my memory seems to have merged that code with the Java
standard lib. So unless you're me, probably there is no documentation
that really implies it's possible :-)

Cheers,

-- Joe
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale






More information about the Ale mailing list