title: how do you make getResourceAsStream work while debugging Java in Eclipse?
body: <p>This is mind-boggling... I can make getResource() and getResourceAsStream() work properly when I run Java on my packaged JAR file that includes a text file. (for reference see the Sun docs on <a href="http://java.sun.com/j2se/1.5.0/docs/guide/lang/resources.html" rel="noreferrer">accessing resources</a>) I can't seem to make the same program work properly when I am running it within Eclipse, even though I've placed my text file in the same tree as my compiled .class files</p>
  
  <p>Can one of you point me at any subtleties to ensure that getResource() and getResourceAsStream() functions work properly?</p>
  
  <p>I have a hunch it has to do with CLASSPATH and/or where Eclipse puts the .class files it autocompiles. (I've noticed when I run Ant, it compiles all the Java files that have changed since my last Ant build, even though Eclipse has compiled those Java files already.)</p>