Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How ClassLoader finds a properties file?  RSS feed

 
ming zhu
Greenhorn
Posts: 16
  • 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
  • Mark post as helpful
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!