title: Can't read file without additional prefix on Intellij
body: <p>I have met some strange trouble with reading file at Intellij Idea and on Windows 8.1.</p>
  
  <p>And always I got <code>FileNotFoundException</code>.</p>
  
  <p>Here is code snippet:</p>
  
  <pre><code>public XlsReader(String fileName, String sheetName) {
      open(fileName, sheetName);
  }
  
  public void open(String fileName, String sheetName) {
      InputStream fis = null;
      try {
          if (sheetName == null || sheetName.isEmpty()) {
              throw new IllegalArgumentException("Please, provide sheet name");
          }
          Logger.logDebug("PATH: " + new File(".").getAbsolutePath());
          fis = new FileInputStream(fileName);
  
          String resourceFilePath = this.getClass().getResource(fileName).getFile();
          Logger.logDebug(resourceFilePath);
          fis = new FileInputStream(resourceFilePath);
  
          XSSFWorkbook workBook = new XSSFWorkbook(fis);
          sheet = workBook.getSheet(sheetName);
          getMetaData();
  </code></pre>
  
  <p>I couldn't understand why at this line:   </p>
  
  <p><code>new FileInputStream(fileName)</code> </p>
  
  <p>I have got this exception.
  And when chcenging path from:</p>
  
  <blockquote>
    <p>xls = new XlsReader("InputDataIndirect.xlsx", "Calculator");   </p>
  </blockquote>
  
  <p>to:</p>
  
  <blockquote>
    <p>xls = new XlsReader("test/InputDataIndirect.xlsx", "Calculator");</p>
  </blockquote>
  
  <p>And it works now.</p>
  
  <p>Here is project struckture:</p>
  
  <p><a href="https://i.stack.imgur.com/sCEf0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sCEf0.png" alt="enter image description here"></a></p>
  
  <p>I tried to load file from class path as well <code>this.getClass().getResource(fileName).getFile()</code> but it wasn't successful.</p>
  
  <p>Any suggestions?</p>