How do i get the output of a command?

just found a bit of code elsewhere
replacing

outputBuffer.clear();
String read;
while ((read = out.readLine()) != null) outputBuffer.add(read);

with

String read;
while ((read = out.readLine()) != null)
{
System.out.println(read);
}

gave me something i can now work with

2 Likes