title: Resources file is found by Gradle but not by Eclipse
body: <p>In my gradle java project, if I run <code>./gradlew run -PappArgs="['file.dat']"</code> it is compiled and my app succesfully uses the file located in <code>/src/main/resources/</code>. I have integrated Eclipse with gradle and imported my project into Eclipse. When I run the app in Eclipse with filname specified in the <code>Run Configurations</code> argument list for the project, it fails to find the <code>file.dat</code> with this code:</p>
  
  <pre><code>import java.io.InputStream;
  import java.util.Scanner;
  public class MyClass {
      public static void main(String[] args) {
          final String fileName = args[0];
          Scanner scanner = null;
          try {
              InputStream f = MyClass.class.getResourceAsStream(fileName);
              scanner = new Scanner(f, "UTF-8"); // fails here saying f is null
          } finally {
              if (scanner != null) scanner.close();
          }
      }
  }
  </code></pre>
  
  <p>Project tree is classic: <code>myproj/src/main/java/MyClass.java</code>, <code>myproj/src/main/resources/file.dat</code> and <code>myproj/src/test/java/MyTest.java</code>.</p>