Again, what is the error? Have you tried using a ProcessBuilder?
Type: Posts; User: KevinWorkman
Again, what is the error? Have you tried using a ProcessBuilder?
I would use a ProcessBuilder if I were you.
And you need to separate your arguments. Instead of exec("top -n1") it would be exec("top", "-n1");
What output are you expecting?
That error tells you that the Process hasn't exited. Your code waits for the first process to exit, but not the second one.
Can you tell us what the error is?