title: Create File at user defined path
body: <p>I am creating a file in java using </p>
  
  <pre><code>BufferedWriter out = new BufferedWriter(new FileWriter(FileName));          
  StringBuffer sb=new StringBuffer();
  sb.append("\n");
  sb.append("work");
  out.write(sb.toString());
  out.close();
  </code></pre>
  
  <p>But this file is getting created inside the bin folder of my server.I would like to create this file inside a user-defined folder.</p>
  
  <p>How can it be achieved.</p>