title: How to create a file in src/main/resources
body: <p>If I do this</p>
  
  <pre><code>fis = new FileInputStream(new File(".").getAbsolutePath() + "/sudoinput.txt");
  </code></pre>
  
  <p>Its trying to write to this location on the server. I am not sure if this is a writable
  place.</p>
  
  <pre><code>FILE NAME (fos)::::::::::::::::::/opt/tomcat/temp/./sudoinput.txt
  FILE NAME (fis)::::::::::::::::::/opt/tomcat/temp/./sudoinput.txt
  </code></pre>
  
  <p>I wanted to write to 
      webapps/sudoku/WEB-INF/classes
  which is basically
      C:\Users...\git\sudo-project\sudo\src\main\resources</p>
  
  <p>On Eclipse Windows 7 I get this
  error
  src\main\resources\sudoinput.txt (The system cannot find the path specified)
  if I give</p>
  
  <pre><code>fis = new FileInputStream("src/main/resources/sudoinput.txt");
  </code></pre>
  
  <p>I have tried this too:</p>
  
  <pre><code>fis = new FileInputStream("src\\main\\resources\\sudoinput.txt");
  </code></pre>
  
  <p>but doesn't work.</p>
  
  <p>how should I create a fileinputstream to be able to write to src/main/resources ?
  please note that I am using eclipse windows to do dev and will be uploading the .war file on to a unix server if this changes the way in which the paths need to be specified.</p>