Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package process;
  2.  
  3. import java.io.BufferedReader;
  4. import java.io.IOException;
  5. import java.io.InputStreamReader;
  6.  
  7. public class Someprocess {
  8. public static void main(String[] args) throws IOException {
  9. String line;
  10. Process p = Runtime.getRuntime().exec("tasklist | sort /R /+58");
  11. BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
  12. while ((line = input.readLine()) != null) {
  13. System.out.println(line);
  14. }
  15. input.close();
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement