> Did not solve the problem
You sure? The same piece of code works for me. BTW, what kind of process is writing to this file of yours? Another Java process? Which JDK version are you using? I used Notepad to update the file & the updates were reflected in my case.