If you insist on doing this via shell script/batch file, then I would recommend you go check out
this article. It documents the pitfalls on using Runtime.exec.
Personally, I question the whole thing.
Why do you want to execute a batch file? To do an svn checkout, run sed to do some replacements within the file...
ever heard of a program called
Ant? I reckon you might find it useful in this case. And its
java based, so you don't even need to bother with runtime.exec.
So yeah. I would recommend you step back, take a look at what you are trying to accomplish, and re-evaluate if you are doing the correct things. When you start getting into batch files and runtime.exec, I think you're on the wrong path.