Amira
Amira

Reputation: 3270

Compiling .jrxml design to get .jasper files with Makefile

I have different jrxml files, I want to compile this to get .jasper designs.I wrote for this an ant build.xml file and it works fine. Here's the used class :

 <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> 
   <classpath refid="classpath"/>
 </taskdef>

Now i want to compile it with GNU Makefile but i can't find the class to execute for this.

How do I compile and get that jasper file with Makefile : Which is the class that have to be executed in jasper jar to get jasper design?

Upvotes: 2

Views: 1831

Answers (1)

Nidhish Krishnan
Nidhish Krishnan

Reputation: 20751

You can use the JasperCompileManager class to compile from your java code.

JasperCompileManager.compileReportToFile(
                our_jasper_template.jrxml",//the path to the jrxml file to compile
                our_compiled_template.jasper");//the path and name we want to save the compiled file 

Upvotes: 3

Related Questions