Hi sabre,
awesome chunk of code there.. I have used it in a fwe of my projects (I have of course given you credit in the about dialog, and in the comments of the code)
The thing is, I am working on somthign a bit more complex now, and I'm really stuck, so I was hoping you could help.
When I use this code, I always remove the line:
[String[] command = {"sh","-c","ps -elf | grep sabre"};
and have it get the command from the constructor....
What I need now though, is to be able to get your method to return the console result from the command... so I want to be able to do this:
Public void whatWineVersion(){
runLinuxCommand("wine --version"); //runLinuxCommand is your method
system.out.println(output from the ruinLinuxCommand output)
}
Normally I would be able to do this myself, but because your method uses nested threads, I can't figure out how to get the output!
Message was edited by:
guardian07