This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Java in General and the fly likes properties File Is Not in My Classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "properties File Is Not in My Classpath" Watch "properties File Is Not in My Classpath" New topic
Author

properties File Is Not in My Classpath

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I have a java class ParamOptions.java. In that class, I use a properties file:

I got an error message:

org.apache.artimus.message.utility.ParamOptions: Can't read the properties file:'website_utility_ParamOptions.properties'. Make sure the file is in your CLASSPATH

1. I put website_utility_ParamOptions.properties at my application root; i.e. MyApplication/website_utility_ParamOptions.properties
2. I have checked the spelling of this properties file
3. The Windows Explorer indicates that this is a PROPERTIES File

Why the error message says that "cannot read the properties file"?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Does your classpath include the 'dot' entry?
eg CLASSPATH=.;c:/the/rest

Dave
 
 
subject: properties File Is Not in My Classpath