here is the program i wrote, and the errors i got. Please help.
import javax.swing.*; //This is the final package name.
//import com.sun.java.swing.*; //Used by JDK 1.2 Beta 4 and all
//Swing releases before Swing 1.1 Beta 3.
import java.awt.*;
import java.awt.event.*;
public class javatry {
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("ls"

;
java.io.InputStream in = p.getInputStream();
java.io.BufferedReader reader = new BufferedReader(new InputStreamReader(in));
String input;
while ((input = reader.readLine()) != null)
{
System.out.println(input);
}
}
javatry.java:15: illegal start of type
while ((input = reader.readLine()) != null)
^
javatry.java:18: <identifier> expected
}
^
javatry.java:13: cannot resolve symbol
symbol : class BufferedReader
location: class javatry
java.io.BufferedReader reader = new BufferedReader(new InputStreamReader(in));
^
javatry.java:13: cannot resolve symbol
symbol : class InputStreamReader
location: class javatry
java.io.BufferedReader reader = new BufferedReader(new InputStreamReader(in));
^
4 errors