import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Aravind Sankaran
*/
public class ListProcessesTaskManager {
public static void main(String a[]) throws IOException{
String processes;
BufferedReader input = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("tasklist.exe").getInputStream()));
while ((processes = input.readLine()) != null) {
System.out.println(processes);
}
input.close();
}
}
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author Aravind Sankaran
*/
public class ListProcessesTaskManager {
public static void main(String a[]) throws IOException{
String processes;
BufferedReader input = new BufferedReader(new InputStreamReader(Runtime.getRuntime().exec("tasklist.exe").getInputStream()));
while ((processes = input.readLine()) != null) {
System.out.println(processes);
}
input.close();
}
}
No comments:
Post a Comment