更新时间:2023-10-20 15:27:40
我不确定Java是否具有可以为您完成此操作的类,因此您需要尝试以下三种方法之一: br/>
1.使用Windowstasklist
程序获取列表并将其输出通过管道传输到Java应用程序中.
2.使用 Java Native Access [ ^ ]库连接到Windows ^ ]函数以获取详细信息.
3.编写一个C ++库以获取所需的详细信息(从EnumProcesses
获取)并通过JNI访问它.
I am not sure that Java has a class that will do this for you so you would need to try one of three options:
1. Use the Windowstasklist
program to get the list and pipe its output into your Java app.
2. Use the Java Native Access[^] library to interface to the Windows EnumProcesses[^] function to get the details.
3. Write a C++ library to get the details you want (fromEnumProcesses
) and access it via JNI.