5 Replies Latest reply on Nov 20, 2008 2:07 AM by 843785

    how to release file lock

    843785
      hi. a function in my program deletes a file (file.txt) creates a temporary file (tempfile.txt) and then once it finishes writing it renames it to (file.txt) through
      tempFile.renameTo(newFile)
      this section works just fine for the first run. however, if i try to call the method again. the function fails to delete (file.txt) due to write protection. i was wondering if there was any way for me to manually release the file locking through java. thanks in advance