So I have a java class that takes individual commands and puts them into the shell through the Runtime and Process objects. My problem is that I can run a command like:
$ls /users/me/documents
and it will work, but
$cd /users/me/documents
$ls
still lists the root. Obviously the Process and runtime objects don't keep track of where it is. Is there any way to capture the terminal object, or do I have to keep track of the current directory manually?