2013-12-23 30 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