在我的揮杆應用程序時,我要打印的Java堆空間,以下異常given.but並不總是像瞬間的時間。在碧玉報告中執行以下代碼時會發生這種情況。我該如何解決這個問題?java.lang.OutOfMemoryError:在JasperReports的
Exception occurred during event dispatching: java.lang.OutOfMemoryError: Java heap space
JRBeanCollectionDataSource datasource = new JRBeanCollectionDataSource(purchasingList);
JasperPrint jasperPrint = JasperFillManager.fillReport(in, params, datasource);
if (view) {// using a JDialog a preview of the print is showed.
new Shows().showJasper(jasperPrint, "Invoice No:" + invoiceNo);
}
final JRPrintServiceExporter exporter = new JRPrintServiceExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
// exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PAGE_DIALOG, Boolean.FALSE);
exporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.TRUE);
exporter.exportReport();
[java.lang.OutOfMemoryError:jasper報告中的Java堆空間]的可能重複(http://stackoverflow.com/questions/1587098/java-lang-outofmemoryerror-java-heap-space-in-jasper-report ) –