Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem keeping "\" chars in a path value using the Properties class

Status
Not open for further replies.

BeyonderAtLarge

Programmer
Mar 18, 2003
10
GB
Hi,

I have a properties file with key/value pairs:

SystemData=C:\egate\client\tmid01

The code:

String systemData = prop.getProperty("SystemData");

returns C:EGATEClient and not C:\egate\client as I would like it to.

I want to make sure the "\" characters don't go away. Is it possible to do with Properties class? do I need to use a specialized sub-class of FileInputStream?

Any help in this regard will be appreciated.

Thanks in advance,
Jon
(503)504 7660
 
change the value in the props file from:

SystemData=C:\egate\client\tmid01

to:

SystemData=C:\\egate\\client\\tmid01
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top