The short answer is "no".  For reasons including security and
platform-portability (Macintosh computers prior to OS X did not have
environment variables, as I understand), the Java platfom does not support
reading environment variables.  However, the JRE has a mechanism for passing
these properties over the command line, but I'm not totally sure whether
they work the same way as the .properties file.  I've been meaning to try it
out, just haven't found the time yet.  I think that if you run

java -DCatalogManager.catalogs=$HOME/cvs/xml/catalog.xml ...

the JRE will use this property assignment rather than what's in the
CatalogManager.properties file.  Since the OS is doing the environment
variable substitution, there aren't any issues on the Java end.

Again, I'm really just guessing on this.  I haven't hunted through the Java
documentation to see how the entire property mechanism works, but I think
this will work.  The naming scheme may be different, though.

Jeff

-----Original Message-----
From: Steinar Bang [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 4:56 PM
To: [EMAIL PROTECTED]
Subject: DOCBOOK-APPS: Using environment variables in
CatalogManager.Properties?


Is there some way to use environment variables in the catalogs
properties of a CatalogManager.Properties file?

Ie. something like this:
        catalogs=$HOME/cvs/xml/catalog.xml
?

Thanx!


- Steinar

Reply via email to