title: Java Relative Path Issue
body: <p>I am facing an issue while trying to resolve a file path using relative paths in Java. I am not sure where I am failing at. Could you please help me out? Thanks!</p>
  
  <pre><code>@Test
  public void testObjectNotNull() throws Exception{
      FileReader fileReader = new FileReader(getClass().getResource("./JavaPractice/resources/tests/codeeval/fileReaderTest.txt").toString());
      assertNotNull(fileReader);
  }
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>java.lang.NullPointerException
      at components.com.codeeval.FileReader.FileReaderTest.testObjectNotNull(FileReaderTest.java:13)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  </code></pre>
  
  <p>Directory Structure:</p>
  
  <p>JavaPractice</p>
  
  <p>--resources.tests.codeeval.fileReaderTest.txt (File that I am trying to access)</p>
  
  <p>--tests.components.com.codeeval.FileReader.FileReaderTest.java (junit which is trying to access the above file)</p>