Java-netbeans 8.1: Unrecognized file?
<p>so i developed a java application and trying to read the file in, i get error message saying the file configuration.txt doesnt exist. </p>

<p>here is the file reading code:</p>

<pre><code>    public static void main(String[] args) throws FileNotFoundException {

    //reading configuration file
    Scanner readConfigurationFile = new Scanner(new File("configuration.txt"));
</code></pre>

<p>yes, i do have the imported necessary IO library and utilities included.</p>

<p>i moved the file everywhere (in the package, or in the project folder, or the bin folder, etc..) and kept testing, but it didnt work.</p>

<p>the only way it works is when i moved it to the desktop and i put the path of the file on the desktop in the code (so C:\User\....\configuration.txt)</p>

<p>but thats not how i want it, because others have to run it without changing code.</p>

<p>any suggestions/help?
i have looked everywhere online and tried different methods but they didnt work. and some would complicate my code so i just avoided. </p>

<p>thanks in advance</p>