title: File Not Created in Java
body: <p>I'm sure I'm missing something basic here.
  I'm trying to create a new file on my drive, but I'm getting an error:</p>
  
  <pre><code>Exception in thread "main" java.io.FileNotFoundException: C:\ProgramData\msena\test.txt (The system cannot find the file specified)
  at java.io.FileInputStream.open(Native Method)
  at java.io.FileInputStream.&lt;init&gt;(FileInputStream.java:120)
  at java.io.FileReader.&lt;init&gt;(FileReader.java:55)
  at net.meosoft.relatetoit.core.HibernateSessionFactory.main(HibernateSessionFactory.java:89)
  </code></pre>
  
  <p>My code at the moment is:</p>
  
  <pre><code>    final File file = new File("C:\\ProgramData\\uname2\\test.txt");
      final BufferedReader in = new BufferedReader(new FileReader(file));
      while(in.ready()) {
          System.out.println(in.readLine());
      }
      in.close();
  </code></pre>
  
  <p>What's wrong at the moment?  I want to just read, even if it's there (so file should be made).</p>