title: FileReader unable to find the file in Java Project
body: <p>I am developing a Java EE application on Mac OS using Tomcat 7 server.
  My project structure looks like this -
  <a href="https://i.stack.imgur.com/yUR7j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yUR7j.png" alt="enter image description here"></a></p>
  
  <p>Below is the function that I am using to read the JSON file - <code>20180507.json</code></p>
  
  <pre><code>private void getCurrencyJSON(){
          JSONParser jsonParser = new JSONParser();
          try 
          {
              System.out.println(new File(".").getAbsoluteFile());
              FileReader reader = new FileReader("/data/20180507.json");  
              //Read JSON file
              Object obj = jsonParser.parse(reader);
              JSONArray currencyList = (JSONArray) obj;
              System.out.println(currencyList);           
  
          } catch (FileNotFoundException e) {
              e.printStackTrace();
          } catch (IOException e) {
              e.printStackTrace();
          } catch (ParseException e) {
              e.printStackTrace();
          } catch (org.json.simple.parser.ParseException e) {
              e.printStackTrace();
          }   
      }
  </code></pre>
  
  <p>This results in a <code>java.io.FileNotFoundException: /resources/20180507.json (No such file or directory)</code> exception. 
  Also, <code>System.out.println(new File(".").getAbsoluteFile())</code> results in <code>/private/var/folders/0z/88rzgp7s4h3d18zzp4btcr2h3x133x/T/AppTranslocation/89F63404-971F-4AB6-9727-B1BD6E9F4A8D/d/eclipse/Eclipse.app/Contents/MacOS/.</code></p>
  
  <p>How do I read this file? Also, is there a resource from where I can learn more about how file paths work in Java?</p>
  
  <p>Thanks in advance</p>