Jump to content
Changes to the Jaspersoft community edition download ×

Why is CardReport.java removed ?

2005 IR Help

Recommended Posts

By: John Zoetebier - johnzoet

Why is CardReport.java removed ?

2004-01-13 23:33

I have copied one of the programs from demo/sample to my project for testing purposes to see if enviroment is working well.

For some reason each time I run Ant task "compile" file CardReport.java is removed.

I have stripped the build file from everything except the compile target, but still file CardReport.javais removed.

Files in folder are:






When I run program TestCardReport.java directly using the same parameters as the build file CardReport.java is NOT removed.


Does anybody have an explanation for this weird behaviour ?


My build file is below:


<project name="JasperReports" default="javac" basedir=".">


<property name="program.name" value="report.TestCardReport"/>

<property name="report.name" value="CardReport"/>


<property name="base.dir" value="../../"/>

<property name="src.dir" value="${base.dir}/src"/>

<property name="classes.dir" value="${base.dir}/classes"/>

<property name="lib.dir" value="${base.dir}/lib"/>


<!-- Build classpath -->

<path id="classpath.refid">

<pathelement location="${classes.dir}"/>

<fileset dir="${lib.dir}">

<include name="**/*.jar"/>




<property name="classpath" refid="classpath.refid"/>



echo properties for debugging purposes


<target name="echo">





Compiles the XML report design

and produces the .jasper file.


<target name="compile" description="Compiles the XML report design and produces the .jasper file. ">

<java classname="${program.name}" fork="true">

<arg value="-Tcompile"/>

<arg value="-F${report.name}.xml"/>

<classpath path="${classpath}"/>










By: Vinod Kumar Singh - vinodsingh

RE: Why is CardReport.java removed ?

2004-01-15 22:28

look at here







By: John Zoetebier - johnzoet

RE: Why is CardReport.java removed ?

2004-01-17 02:13

Thanks Vinod,


This explains why CardReport.java is removed when running the Ant build file.

The reason the java file is removed using the Ant file is because the Ant file makes the directory with the xml file the current directory.

When I run the program via the Eclipse IDE it must be an other directory.

Bit of a scary thought though becuase I have no idea which folder is actually used to create the intermediate java file needed for creating the jasper file ?






By: Teodor Danciu - teodord

RE: Why is CardReport.java removed ?

2004-01-24 12:52




Set the "jasper.reports.compile.temp" system property like explained here:




I hope this helps.







By: John Zoetebier - johnzoet

RE: Why is CardReport.java removed ?

2004-01-24 17:10

As said by Theodor I set system property:

System.setProperty("jasper.reports.compile.temp", "/home/temp");


And this solved the .java override problem

An other solution is to put the xml report in a resource folder outside the source folder.

Or name the java file different from the report, like:



Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...