Jump to content
JasperReports Library 7.0 is now available ×

Run report without ant


2004 IR Help

Recommended Posts

By: Angelo - sheva82pippo

Run report without ant

2005-09-20 00:31

I need to run my report from command line without using ant bat.

I am not able to write the correct command line in dos mode.

I think it is "java + NameOFtheClass + Parameters + Classpath" but I don't understand like ant build this command line.

 

My build.xml si this:

....

<property name="pippo" value="StampaApp" />

<property name="pippo2" value="Testata" />

<property name="pippo3" value="../../../build/classes" />

<property name="pippo4" value="../../../lib" />

<property name="pippo5" value="../../fonts" />

 

<path id="classpath">

<pathelement location="./"/>

<pathelement location="${pippo3}" />

<pathelement location="${pippo5}" />

<fileset dir="${pippo4}">

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

</fileset>

</path>

............

<target name="view" description="Fills the report and launches the report viewer to preview it.">

<java classname="${pippo}" fork="true">

<arg value="-Tview"/>

<arg value="-F${pippo2}.jasper"/>

<classpath refid="classpath"/>

</java>

</target>

...

 

I tryed to run in different ways my appication but there are always a "notClasselfoundError" for "net.sf.engine.jasperreports.jrdatasource".

I think that this class is defined in the classpath of ant but I don't know how to write it from command line.

 

Thanks a lot, Angel

 

 

 

 

By: jorge - sirion_oef

RE: Run report without ant

2005-09-20 11:34

your problem is how to set the classpath for include all the libs of jasperreports when you call 'java', you could search tutorials about setting this parameter, there are a lot of them

 

 

 

 

By: Angelo - sheva82pippo

RE: Run report without ant

2005-09-21 03:40

yes you are right!

I solved, for example a command line for XmlDataSourceSample is:

 

java -classpath .;../../../build/classes;../../../lib;../../fonts; XmlDataSourceApp -Tcsv -FCustomersReport.jrprint

 

 

Thanks, Angel

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...