• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about copy of a File/jar which is running in jvm.

 
lei feng
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get a old jar-file running in a jvm and a new jar-file in another folder.I think the old is locked by the jvm. but i can use copy cmd to copy the new file and overwrite this old file.(copy cmd/ctrl+c,ctrl+v). but i can not use cut/paste to finish it(move cmd/ctrl+x,ctrl+v). it will get a error window. if i stop the jvm. i can use the the cut/paste to overwrite the old file. so i'm wondering whether the old file running in jvm is locked.
In java, the situtation is same.I use File.renametoFile() i can not overwrite the old-file.But i use some code to copy it, i can overwrite the old file.
So I'm pulzzed,i don't know how to explain it.

this is the copy code i used.

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(sorry, this is not related to your question, but could you check your private messages ? )
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic