Instead of Runtime.exec(String) I'd recommend to use Runtime.exec(String). This and other tips on using Runtime.exec -like dealing with the process's streams- are explained in detail in the article "When Runtime.exec() doesn't" by Daconta (which is really required reading when using it).
Ping & DNS - updated with new look and Ping home screen widget
I think it's spelt "When Runtime.exec() won't", but as Ulf has said, you need to find it with Google and read it. It is a little easier now the ProcessBuilder class has been introduced, but only slightly easier. And don't go saying your request is urgent.
This question is too difficult for the beginners' forum. Moving.