I am generating a reports in a web application running on Windows, exporting it as pdf. I need to later programatically delete this files within the application. Creation works fine: File file = new File(reportFilename);OutputStream os = new FileOutputStream(file); InputStream reportStream = facesContext.getExternalContext().getResourceAsStream("/reports/" + jasperFilename);JasperPrint jrPrint = JasperFillManager.fillReport(reportStream, parameters, dataSource); JasperExportManager.exportReportToPdfStream(jrPrint, os); When I later call File.delete(), it returns false. And if I try to delete it from Windows Explorer before shutting down the Tomcat web server, it reports "File in Use"It appears as if the output stream is not being being closed. Thanks for any suggestions.