title: getCanonicalFile and getAbsoluteFile returns the current (project) directory instead of the expected one
body: <p>I try to make a simple program that contains the function of browsing local file system.</p>
  
  <p>However, I met a problem when the address is directly input.</p>
  
  <pre><code>public void setWorkingDirectory(File newDir)
  {
      try
      {
          //try to eliminate redundancy
          this.workingDir = newDir.getCanonicalFile();
      }
      catch (IOException e)
      {
          this.workingDir = newDir;
      }
  }
  </code></pre>
  
  <p>I need the absolute path to display on the screen. So I use <code>getCanonicalFile()</code>. Everything works fine except that when I input "D:" the workingDir will be set to the current project directory in Eclipse (I think it should be the current directory when executed independently, the example is "D:\EclipseWorkspace\workspace\FTPClient") but the File newDir contains exactly the same path ("D:") (I traced it).</p>
  
  <p>If I input "C:" or "D:\", then everything is fine. I couldn't find any information about this on the Internet. Could anyone tell me what's going on here and how to solve the problem?</p>
  
  <p>Thanks in advance.</p>
  
  <p>EDIT: I work on Windows XP SP3 with Java 6 if that matters.</p>