title: How to use "cd" command using Java runtime?
body: <p>I've created a standalone java application in which I'm trying to change the directory using the "cd" command in Ubuntu 10.04 terminal. I've used the following code.</p>
  
  <pre><code>String[] command = new String[]{"cd",path};
  Process child = Runtime.getRuntime().exec(command, null);
  </code></pre>
  
  <p>But the above code gives the following error </p>
  
  <pre><code>Exception in thread "main" java.io.IOException: Cannot run program "cd": java.io.IOException: error=2, No such file or directory
  </code></pre>
  
  <p>Can anyone please tell me how to implement it?  </p>