• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

properties out put problem

 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my code
loading property file
props.load( new FileInputStream(propertyfile));
making changes in property file
props.setProperty("name","xyz" );
out putting the proeprty file
File proper = new File(propfile);
FileOutputStream propfileoutput = new FileOutputStream(proper);
props.store(propfileoutput, null);
propfileoutput.close();

the problem
------------------------------------------
the links in the property file
eg:- c:\\temp\\test
is converting to
c\:\\temp\\test
----------------------------------------------
how to avoid this error

thanks in advance
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi kamesh!

Dont worry about that!

In a property-file, there are some characters with a special meaning e.g. = : ! #.

The store-method will escape these characters with a \ eg \: So the load method can interpret the property file correctly.

after re-loading the property file, the content will be right.

Stefan.
[ April 13, 2005: Message edited by: Stefan Willi ]
 
kamesh aru
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the answer
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic