 <p>Where is the file InpData.txt?</p> <p>Place a breakpoint and debug <code>new File(fileName).getAbsolutePath()</code> to see where it should be. Place your file there.</p> <p>Don't hard-code the path if you want the code to be portable (if it is being executed on another machine).</p>