title: How to read txt file from jar and docker opt directory
body: <p>I need to write functional which could to process not only jar file like resource/config/file.txt but also file which located in opt docker directory.
  I have first case where txt file is located in jar</p>
  <pre><code> try (InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream(&quot;resource/config/file&quot;)) {
          if (inputStream == null) {
              throw new FileNotFoundException(&quot;can't find configuration file&quot;);
          }
  </code></pre>
  <p>and its work,but if I try to put /opt/docker/conf its does not work</p>
  <p>I have second case where txt file is located in docker opt directory</p>
  <pre><code>try (Reader reader = new FileReader(&quot;/opt/docker/conf&quot;))
  </code></pre>
  <p>its Work</p>
  <p>Is there a way to combine both cases?</p>