In this small note I want to share the information regarding the ~+JFxxxxx.tmp files
that are produced by JVM during it's work with JasperReports Library/JasperReports Server.
|1) Why those files are produced?(e.g. instead use memory)What data is included?|
The files are not directly created by JR but by the JRE, more
specifically by java.awt.Font.createFont(int, InputStream). It seems
that the JRE (the Sun/Oracle implementation at least) needs to work with
font files and doesn't support in memory font data.
|2) What is the size of file and number of file depend on?(Font data|
size? or reports? or something?)
Each file is a copy of a font file defined in a font extension. Note
that in some classloading scenarios a font extension can be loaded
several times, resulting in several temp files.
|3) Why sometimes temp files are not deleted? in what case?|
The files should be deleted on graceful JRE shutdown. They are not
deleted when the Java process is forcefully killed.
|4) Are these files made by JasperReportsLibrary?Can I change their location?|
If you need to change the directory in which these files are generated
please define or change the value of the -Djava.io.tmpdir variable for your application.
Thank you for your attention to this article.