title: InputStream Cannot Be Null / Can't Access File Inside Another Package
body: <p>I'm trying to access a file from one class inside another package inside a JAR file. To be more specific, the class in which I'm creating the inputstream is named ClassA.class and is located in the package: com.something.somethingelse while the file I'm trying to open with inputstream is located in the package com.something.storage. I'm calling the getResourceAsStream method as shown below:</p>
  
  <pre><code>    ClassA.class.getResourceAsStream("/com/something/storage/MyFile.txt");
  </code></pre>
  
  <p>However, it throws a IllegalArgumentException saying that the inputstream cannot be null. I've tried storing the text file in the same package as ClassA and the problem did not appear. Only when it's stored in another package does this occur. Please help.</p>
  
  <p>It might also be helpful to know that the method I'm doing this in is a static one. Will that have anything to do with the problem?</p>