title: Adding a non-jar file to the Java class path
body: <p>I'm trying to make a .txt file available to my application via the class path.  In my startup script--which is co-located in the same folder as the .txt file--I've set the following:</p>
  
  <p>set CLASSPATH=%CLASSPATH%;%CD%\sample.txt
  java -classpath %CD%\sample.txt</p>
  
  <p>In my application, I've tried the following:</p>
  
  <ol>
  <li>getClass().getResource("sample.txt")</li>
  <li>getClass().getResource("/sample.txt")</li>
  <li>getClass().getResource("classpath:sample.txt")</li>
  </ol>
  
  <p>None of the above work.  Any help would be appreciated.</p>