File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Properties Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Properties Files" Watch "Properties Files" New topic
Author

Properties Files

James Turner
Ranch Hand

Joined: May 10, 2004
Posts: 194
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.


James<br />SCJP 1.4 - 92%<br />SCJD - 93%<br />SCWCD 1.4 - 95%<br />SCBCD 1.3 - 100%<br />SCEA - 92%
Charlie Goth
Ranch Hand

Joined: Feb 26, 2004
Posts: 60
Checkout the load method in java.util.Properties

Charlie


SCJP (77%)
James Turner
Ranch Hand

Joined: May 10, 2004
Posts: 194
Thanx for the help.
Along huang
Ranch Hand

Joined: Feb 09, 2004
Posts: 72
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!


SCJP1.4 SCJD 2<br />SCEA(In progressing)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Properties Files
 
Similar Threads
Can't use properties file in EJB project developed in WSAD
resource bundle error
Problem reading resource bundle with java.io.File but not with Resource Bundle
not able to locate message.properties using ResourceBundle
properties file using the ResourceBundle class?