• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Java File.createTempFile() ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Java File.createTempFile() ?


  • Subject: Java File.createTempFile() ?
  • From: Theodore Petrosky <email@hidden>
  • Date: Tue, 15 Jul 2014 09:56:33 -0400

I was rooting around on my Mac as I had just installed a new SSD and I wanted to do a clean install of a lot of stuff. I noticed  a bunch of pdfs hanging around and I wanted to find out where they were coming from.

I found them here: 

/var/folders/f1/68bl839n5vzcw6l75jgykqk40000gn/T

These pdfs are create whenever I run my app and create a pdf with ERJasperReports. They get created in ERJRUtilities.java in the method   runCompiledReportToPDFFile  it looks like:

File destFile = File.createTempFile(compiledReportName + System.currentTimeMillis(), ".pdf");

I am reading everything in Kieran’s ERJasperReports, I don’t see that the temp files are ever deleted. Did I miss something obvious? After googling around, I found a few conversations on StackOverflow all talk about temp files and methods to make sure they are deleted.

of course I could add    destFile.deleteOnExit(); before returning, but that just means the temp file will get deleted when the app exits. Or rather it gets deleted when the VM terminates normally.

Is anyone else using ERJasperReports that can confirm that these temp files are or are not being deleted?

this is the stack overflow conversation. It appears to be rather complex as the destFile is created, but needs to hang around until it has been properly downloaded.

http://stackoverflow.com/questions/16691437/when-are-java-temporary-files-deleted


Does anyone have any experience with JasperReports either your own creation, or using ERJasperReports that takes care of these pesky temp files?

Ted

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Java File.createTempFile() ?
      • From: Ralf Schuchardt <email@hidden>
  • Prev by Date: Re: Redirect from Spring MVC application to WebObjects application
  • Next by Date: Re: Redirect from Spring MVC application to WebObjects application
  • Previous by thread: Re: Redirect from Spring MVC application to WebObjects application
  • Next by thread: Re: Java File.createTempFile() ?
  • Index(es):
    • Date
    • Thread