Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Properties Files

 
James Turner
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am having trouble reading in a properties file. The file is in my base directory and I am using the code:



This does not find the properties file with name: suncertify.properties, I am not sure if I am using the right code with the ResourceBundle.getBundle method.

Can anyone see what I am doing wrong, or is there another way to do it without doing low IO.

Thanx for your help.

James.
 
Charlie Goth
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Checkout the load method in java.util.Properties

Charlie
 
James Turner
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanx for the help.
 
Along huang
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The paratemer must is a full path, assume your file is put in directory "suncertify\conf\log.properties", then the path should be "suncertify.conf.log".

good luck!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic