NoSuchFileException while reading a file
<p>I am trying to read a file, but I get a <code>NoSuchFileException</code>. I know my code work, because it works in another program I have created, but it doesn't work now. Yes the directory is correct and there is a text file in the <em>src</em> folder. Please could someone tell me how to fix this.</p>

<pre><code>String[] words = new String[5];

Path file = Paths.get("H:\\Varsity work\\Java Programming\\Programs\\HangMan\\build\\classes\\HangMan.txt");
InputStream  input = null;
try {
    input = Files.newInputStream(file);
    BufferedReader reader = new BufferedReader(new InputStreamReader(input));
    String s = null;

    while((s=reader.readLine())!=null) {
        System.out.println(s);
    }
    input.close();
} catch(Exception e) {
    System.out.println(e);
}
</code></pre>