2

如何让所有进程及其各自的程序和 dll 在 Windows 中运行?

4

1 回答 1

0

There's no easy way to do that, as Java doesn't have an interface to Windows API. The easiest way I can think of is this:

    Process proc = Runtime.getRuntime().exec("tasklist /M");
    InputStream is = proc.getInputStream());
    // and now read and parse that long output, listing all processes and DLLs...

This does require some work on the parsing, but it saves you from getting out of the Java world.

于 2012-07-03T21:05:06.840 回答