Exception

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

Exception

glenn
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

kiwiwings
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:
https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/DefaultTempFileCreationStrategy.java?view=markup
The strategy can be set via TempFile.setTempFileCreationStrategy()

Andi



signature.asc (499 bytes) Download Attachment