• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResourceBundle.getString() and dbfile path

 
Paul O'Leary
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anybody know why the File separators on Windows are removed from the ResourceBundle.getString() invocation as follows?

System.out.println(resourceBundle.getString("dbfile"));
C:eclipseworkspacescjddb-2x3.db

Despite the fact that I use PrintWriter successfully to write the key=value pair as dbfile=C:\eclipse\workspace\scjd\db-2x3.db to the suncertify.properties file.

Thanks in advance,

Paul.
 
Liviu Carausu
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
For manipulating the properties file you can use the java.util.Properties
class which has load and store methods. You can store a Properties object into a file and load a Properties object from a file. I hope this helps.
Liviu
 
Paul O'Leary
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Liviu, that resolved my problem with the file path using a Properties object and FileInputStream as the parameter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic