Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to access System properties in xml file

linkinNov 8 2010 — edited Nov 10 2010
hi,

i want to read system properties in my xml file using ${} .
I tried it but did not find any way.But when i use log4j if i set some variable in
System properties that properties is read by the log4j.properties .
I am writing a simple program that read a xml properties file file
try {
            props   = new Properties();
            fis     = new FileInputStream(xmlFile);
            props.loadFromXML(fis);
}
before reading this file i set some properties and accessing this properties from that xml .but i cant.


Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2010
Added on Nov 8 2010
6 comments
1,455 views