用于关闭在 java(TM) 平台 SE 二进制文件中打开的文件的 Java 代码
我的应用程序中有用于删除文件的java代码,即nameOffile.delete()。当我尝试删除该文件时,出现错误:该操作无法完成,因为该文件是在 Java (TM) Platform SE 二进制文件中打开的。关闭文件并重试。我尝试在没有应用程序的情况下删除文件,但仍然遇到同样的问题。请帮我解决这些错误。
先感谢您!!
I have java code in my application for deleting a file i.e nameOffile.delete(). As I try to delete the file I get an error: The action can not be completed because the file is open in Java (TM) Platform SE binary. Close the file and try again. I tried deleting the file without the application but I still get the same problem. Please help me solve thes error.
Thank you in advance!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能首先打开文件来读取/写入其内容?
您可能忘记关闭流。因此您无法删除它。
You were probably opening the file first to read/write its content?
There you probably forgot to close the stream. Therefore you are not able to delete it.
要解决此问题,请打开任务管理器并关闭 java,然后您就可以删除该文件
To solve this problem open task manager and close java then you'll be able to delete the file