Should all resources in a java web application be uniquely named?

Posted by morgancodes on Stack Overflow See other posts from Stack Overflow or by morgancodes
Published on 2010-06-05T23:43:34Z Indexed on 2010/06/05 23:52 UTC
Read the original article Hit count: 213

Filed under:
|
|

Trying to understand resources in java-land. I believe the following is true:

  • Resources loaded via the classpath have no namespace, they only have a file name.
  • It's wisest to always load resources via the classpath, never via the file system, even in unit tests.

Therefore, resources must always have unique file names, or collisions will occur.

Are there flaws in my assumptions or my conclusion?

© Stack Overflow or respective owner

Related posts about java

Related posts about resources