File get save under some Unknown Path in Eclipse
<p>I am using Eclipse and have the following folder structure:</p>

<p><a href="https://i.stack.imgur.com/fWIat.png" rel="nofollow noreferrer">Eclipse Folder Structure</a></p>

<p>In UserHelper.java i have the code</p>

<pre><code>try {
  File file = new File ("vikvik1.JSON");

  if (!file.exists ()) {

    System.out.println ("No file");
    file.createNewFile ();
    temp = true;
  }

  System.out.println (file.getAbsolutePath ());

} catch (IOException ioe) {
  System.out.println ("Exception occurred:");
  ioe.printStackTrace ();
}
</code></pre>

<p>But after creating the file, the output is <code>C:\Users\a595649\Documents\Vikram Thakur\Soft\eclipse\vikvik1.JSON</code>
This is the location where my Eclipse Exe file is stored. </p>

<p>How can I get this File saved under my project DBnov folder ?</p>