title: How to access a file in a static context?
body: <p>I have the following structure in my eclipse project:</p>
  <p><img src="https://i.stack.imgur.com/B2rjn.png" alt="enter image description here" /></p>
  <p>I want to access the file <em>lito.properties</em> with the method <em>FileInputStream</em>.</p>
  <p>Searching at the internet, I found this solution:</p>
  <pre><code>FileInputStream file = (FileInputStream)this.getClass()
                                              .getResourceAsStream(&quot;/files/lito.properties&quot;);
  </code></pre>
  <p>It seems to be the best way to do this, but what if I'm working in a static method?
  It will always give this error:</p>
  <blockquote>
  <p>Cannot use this in a static context</p>
  </blockquote>
  <p>So, What I have to do to access this file in a static context?</p>