It doesn't help, when DeleteOnExitHook is called the file handle is still
there

On Tue, Jan 31, 2017 at 10:26 AM, Remko Popma <[email protected]> wrote:

> You can try calling File.deleteOnExit().
>
> On Wed, Feb 1, 2017 at 3:17 AM, Clément Guillaume <[email protected]>
> wrote:
>
> > Hi,
> >
> > I have a unit test, using log4j 2.8 to log to a file using a
> FileAppender,
> > that deletes the log file at the end of the test. This test works well on
> > linux, but fails on Windows because the java process still has a file
> > handle to the log file, and so the file cannot be deleted.
> > Any idea how to have the same behavior on the two platforms?
> >
> > Thank you.
> >
>

Reply via email to