File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How ClassLoader finds a properties file?

 
ming zhu
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18944
  • 0
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic