Quite a few entries in this forum and numerous blog postings discuss locked files on Windows.
Probably the underlying problem is that the process in which GlassFish is running has the JAR files open. Windows prevents opened JAR files from being deleted, and if GlassFish has the files open then NetBeans will not be able to delete them. You can confirm this by either restarting the server and seeing if that allows the JARs to be deleted or use some tool such as "handle" that shows which processes have which files open. You can read about and download handle from
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Handle.mspx if you are interested.
Assuming that it is the GlassFish process does have the files open you can get a good idea what code has opened them but not closed them by using the tool I describe here
http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish and then posting the results as an attachment to this topic and I'll take a look. Be sure to follow the directions in the blog carefully to get the best-quality output.
- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]
http://forums.java.net/jive/thread.jspa?messageID=256781