File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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:, 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<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


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\", then the path should be "suncertify.conf.log".

good luck!

SCJP1.4 SCJD 2<br />SCEA(In progressing)
I agree. Here's the link:
subject: Properties Files
It's not a secret anymore!