Hi All
Im getting package error for this please anyone help me with this.Im attaching image of Error got when i run the program
import java.io.InputStream;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.*;
import java.lang.*;
import java.awt.*;
public class Ps {
public static void main(String[] args) {
try {
String line;
Process p = Runtime.getRuntime().exec
(System.getenv("windir")+"\\system32\\"+"tasklist.exe");
BufferedReader input = newBufferedReader(newInputStreamReader(p
.getInputStream()));
while ((line = input.readLine()) != null) {
// Write your own parser to parse the data
here.
System.out.println(line);
}
input.close();
} catch (Exception err) {
err.printStackTrace();
}
}
}


LinkBack URL
About LinkBacks



Reply With Quote

