File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes I/O and Streams and the fly likes Created File cannot be Deleted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Created File cannot be Deleted" Watch "Created File cannot be Deleted" New topic

Created File cannot be Deleted

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1562
If I use code to create a file the file cannot be deleted with code. There are no exceptions thrown. If I manually create the file if delets fine.

My create code:

My delete code:

Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Your delete code deletes the file and then recreates it.

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
I agree. Here's the link:
subject: Created File cannot be Deleted
It's not a secret anymore!