classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view


Hi,I would like to know how can I can the temporary directory folder in apache poi.  I saw the TempFile code that class is a final class from where the class is being called in apache poi library.Regards,Glenn Dsilva 
Reply | Threaded
Open this post in threaded view

Re: Exception

Hi Glenn,

your mail looks auto-corrected, but I guess you want to know, how to configure the TempFile directory.

Option 1:
Configure the Java tmpdir when calling your program:
-Djava.io.tmpdir=<path to your temp directory>

Specify -Dpoi.keep.tmp.files=<anything> to suppress the deletion of the tempfile, i.e. the default is to remove temporary files.

Option 2:
Provide a custom TempFileStrategy.
Have a look at:
The strategy can be set via TempFile.setTempFileCreationStrategy()


signature.asc (499 bytes) Download Attachment