System cannot find path specified
<p>I'm reading information from a (maven) generated file located at <code>target/[projectname]/WEB-INF/classes/</code>. Eclipse does not show me the path, however, I cannot create a new folder named <code>classes</code> in <code>WEB-INF</code> (because there is already an existing one).</p>

<p>I can find the folder and the file via the command line, however, I cannot create a <code>FileInputStream</code> for the file. </p>

<p>However, I get access to other files located in <code>target</code>, e.g., <code>target/maven-archiver/pom.properties</code>, which is already generated during each build. The only difference is that I can see the file in Eclipse.</p>

<p>The project is a GWT one and built with maven. I don't see any reason why Java cannot find the path.</p>

<p>The file I'm accessing is <code>version.properties</code>. I can see it in the explorer (the project name is blacked out):</p>

<p><a href="https://i.stack.imgur.com/ynqwQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ynqwQ.png" alt="File Location"></a></p>

<p>I try to open the file via</p>

<pre><code>private static final String PATH = "target/[projectname]/WEB_INF/classes/version.properties";

public static String getVersion() {
    String version;
    Properties prop = new Properties();
    File resource = new File(PATH);
    try {
        prop.load(new FileInputStream(resource));
        version = prop.getProperty("build.time");
    } catch (IOException e) {
        e.printStackTrace();
        version = "01.01.2016 00:00";
    }
    return version;
}
</code></pre>

<p>The exception I get is</p>

<pre><code>java.io.FileNotFoundException: target\[projectname]\WEB_INF\classes\version.properties (Das System kann den angegebenen Pfad nicht finden)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:138)
at [projectname].utils.VersionUtils.getBuildTime(VersionUtils.java:31)
[...]
</code></pre>