title: reading a file from current directory in java
body: <p>I have a java project where I am reading a file. As the file is in the current directory I am doing this:</p>
  
  <pre><code>String dataset = "./myFile.dat";
  </code></pre>
  
  <p>But I am getting: <code>java.io.FileNotFoundException</code> saying It can not find the file.</p>
  
  <p>How to fix this?  When I give entire path it works...</p>
  
  <pre><code>String dataset = "C:\\eclipse\\workspace\\p1\\src\\myFile.dat";
  </code></pre>