2013-12-23 32 views
1

我有不同的jrxml文件,我想编译这个文件来获得.jasper designs.I为这个ant build.xml文件编写的,它工作正常。 下面是使用的一类:编译.jrxml设计用Makefile获取.jasper文件

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

现在我想与GNU的Makefile编译它,但我不能找到这个执行的类。

如何使用Makefile编译并获取该jasper文件:哪些类必须在jasper jar中执行以获取jasper设计?

+1

你想编译JRXML用java –

+0

碧玉@NidhishKrishnan是:) – AmiraGL

+0

检查我的答案.............. –

回答

2

您可以使用JasperCompileManager类从您的java代码进行编译。

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