请问java能否获取系统进程的信息?能否杀死一个系统进程?
上网搜了一下,几乎都是要用C/C++的

解决方案 »

  1.   

    用C/C++写native方法,从Java中调。
      

  2.   

    只要能调native方法,Java就没啥不能做的。
    因为理论上native方法完全可以直接用汇编来写。
      

  3.   

    Process p = Runtime.getRuntime().exec("cmd.exe /c mkdir hello");
    BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line ="";
    while((line = input.readLine())!=null){
    System.out.println(line);
    }
    input.close();
      

  4.   

    http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html
      

  5.   

    像5楼调用系统一些命令,JAVA所做的就是获取系统命令执行后返回的信息?