Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个用于 .chm 文件的正在运行的进程 hh.exe。我需要使用 java 代码获取所有打开的 .chm 文件的名称。
Runtime.getRuntime().exec("tasklist.exe /nh /v"); 将返回您正在运行的应用程序,您应该能够根据文件扩展名过滤掉。
我很确定您无法判断文件是否已打开或未使用纯 Java 代码。