Hi Peter,
On Windows, if you have NetBeans and you done some modfication to file in Netbeans Editor & in Windows Task Manager "Application" Tab select NetBeans 3.6 and end task then it will ask user to save before existing.
May be what you have done is in Windows Task Manager under "Processes" tab if you kill runide.exe, this is wonot ask user to save, this case documented in Runtime.addShutdownHook().
what i wanted know how it works in the 1st case I mentioned.
Hope it is clear.
thanks
Manjunatha