title: Java system.getProperty("user.dir") gives wrong result in ubuntu
body: <p>I develop a Java application which is able to run cross-platform with condition in JRE version at least 1.6.0.14. Everything is work fine on a Windows machine (JRE1.6.0.14) but unwanted result in Ubuntu 8.04 with JRE1.6.0.14.</p>
  
  <p>I found the errors here:</p>
  
  <pre><code>Document doc = docBuilder.parse (new File("webservices.xml"));
  </code></pre>
  
  <p>On the Windows machine, everything works ok, the docBuilder will refer the file at which my application located at.
  Example: if my application located at C:\myApp\start.jar , it will refer webservives.xml at C:\myApp\webservices.xml (this mean it will always refer correct directory no matter where i move my application folder)</p>
  
  <p>But in Ubuntu 8.04 it doesnt work.</p>
  
  <p>I am able to figure out the problem by using this in application:</p>
  
  <pre><code>String curDir = System.getProperty("user.dir");
  System.out.println(curDir);
  </code></pre>
  
  <p>No matter where I place my application folder, the <code>curDir</code> always return "/home/user". <code>Document doc = docBuilder.parse (new File("webservices.xml"))</code> doesn't work until I place the webservices.xml in directory /home/user/webservices.xml.</p>
  
  <p>Running my application using Netbean 6.5.1 in Ubuntu return correct curDir but running my application standalone return wrong curDir (i am using JDK1.6.0.14 and JRE1.6.0.14 same as window machine)</p>
  
  <p>Why <code>Document doc = docBuilder.parse (new File("webservices.xml"))</code> cant work properly in ubuntu JRE1.6.0.14?</p>
  
  <p>Any idea to make my application work standalone in Ubuntu 8.04 just like in window machine?</p>