Is there a programatic way from java to force a file deletion on windows even if the file is locked by some process? I cannot kill the process that locks the file.
el_eduardo
问问题
2267 次
3 回答
6
you can go through JNI. But the whole point of locking was NOT to allow for deletion from another process.
So, unless you're running Windows 9x, this might be impossible to do.
That said, if you're aware of a way to do it using WIN32, then you might be able to do it in java using JNI.
于 2008-10-06T21:40:19.700 回答
3
我不是 Windows 专家,但我不知道在 Java 中使用 OR OUT 的方法可以在进程继续运行时可靠地强制删除当前对进程打开的文件。
于 2008-10-06T21:43:59.503 回答
2
使用解锁器。从 Java 调用它作为外部进程。
于 2008-10-07T07:00:28.773 回答