【发布时间】:2014-07-01 00:22:29
【问题描述】:
我正在通过 java runtime api 运行一个 exe
Process process = runTime.exec("cmd.exe /c start abc.exe "+Id, null, new File("D:/My"));
并像这样使用 jna 检索进程 ID -
Kernel32.INSTANCE.GetProcessId((Long) f.get(process));
但返回的进程 ID 不是 abc.exe 而是 cmd.exe .....我需要 abc.exe 的进程 ID。不知道如何获得,任何人都可以帮助。
【问题讨论】: