Created attachment 24859 [details] Adds some lines in order to close all Streams created in OPCPackage Whenever a file (docx, xlsx, pptx) is opened as OPCPackage, modified and afterwards closed with OPCPackage#close, the Java process keeps a file handle open. In order to modify a document with Word, Excel or Powerpoint, the Java process must terminate in order to release the file. This happens because OPCPackage creates and opens Streams, which are never closed. See enclosed Patch for a fix. I couldn't find a problem with that solution so far. Generally speaking, I have the opinion that everyone creating a stream is responsible for the stream lifecycle and must take care that the stream is closed, after all actions requiring it, are done.
Thanks for the patch, applied in r902565 Yegor