title: getResourceAsStream filepath while running .jar
body: <p>My code:</p>
  
  <pre><code>BufferedInputStream bis =
    new BufferedInputStream(getClass().getResourceAsStream("playerhit.mp3"));
  </code></pre>
  
  <p>This code works fine when the <code>playerhit.mp3</code> file is in same package as the <code>MP3.class</code>it is running in. I'm running this as .jar. If though I change the file path to something like <code>/src/data/audio/playerhit.mp3</code> it doesn't work anymore. Is there anyway to access different filepath than root of the package while running as .jar?</p>