1 5 package com.opensymphony.webwork.views.jasperreports; 6 7 import net.sf.jasperreports.engine.JRException; 8 import net.sf.jasperreports.engine.JasperCompileManager; 9 10 16 public class CompileReport { 17 19 public static void main(String [] args) { 20 if (args.length < 1) { 21 System.out.println("Please supply the name of the report(s) source to compile."); 22 System.exit(-1); 23 } 24 25 try { 26 for (int i = 0; i < args.length; i++) { 27 System.out.println("JasperReports Compiling: " + args[i]); 28 JasperCompileManager.compileReportToFile(args[i]); 29 } 30 } catch (JRException e) { 31 e.printStackTrace(); 32 System.exit(-1); 33 } 34 35 System.exit(0); 36 } 37 } | Popular Tags |