title: java getabsolute() fails for path with spaces?
body: <p>In my code, I call getAbsolutePath to get the path for my file. It works totally fine, if the file path doesnot contain any spaces. for example: ~/Desktop/data/a.txt </p>
  
  <p>but I got totally wrong file path if space exists, for example ~/Desktop/data set/b.txt</p>
  
  <p>Is it a bug in java? Any way to get the absolute path right with and without spaces? </p>
  
  <p>code is like:</p>
  
  <pre><code> public void loadDataFile(java.io.File f)
        {
            system.out.println("f.getabsolutepath is "+f.getAbsolutePath());
            ...
         }
  
   what I get is: 
       /home/xx/humans_d/results/a1/a.txt
  
   It should be:
       /home/xx/Desktop/data/hrv pilot humans_d/results/a1.a.txt
  </code></pre>
  
  <p>Thanks a lot. </p>
  
  <p>LJ</p>