File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How ClassLoader finds a properties file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "How ClassLoader finds a properties file?" Watch "How ClassLoader finds a properties file?" New topic
Author

How ClassLoader finds a properties file?

ming zhu
Greenhorn

Joined: Feb 13, 2001
Posts: 16
I have a properties file, called xxx.properties in the first search directory listed in PATH.
However, when I call ClassLoader.getSystemResourceAsStream("xxx.properties") I get a NULL.
Can someone explain to me why?
Thanks a lot!
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Are you sure you've set your CLASSPATH list to the correct values? (PATH doesn't mean anything much to a JVM).
kind regards
ming zhu
Greenhorn

Joined: Feb 13, 2001
Posts: 16
Is it possible at all to get the PATH, not the CLASSPATH, into a string?
Thanks a lot.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How ClassLoader finds a properties file?
 
Similar Threads
Invoking Ant on Ubuntu terminal : same commands as used on Windows doesnt work
Ant task to fill a property data based on envirnment
properties file in eclipse
properties file exception
How To: Path of JBoss Server deployment folder !