Runtime.exec() returns a Process which has an input
stream and an output stream. You should read from
the Process's output (called getInputStream though)
and dump it to the screen. Windows' implementation
doesn't follow the spec (did you use Microsoft's
VJ++? :))
The following code works:
import java.io.*;
public class tstr
{
public static void main(String args[])
{
Runtime r = Runtime.getRuntime();
Process theProcess = null;
try {
theProcess = r.exec("ls -l");