How to Set up a Java Program to call Jaspersoft

Hi, absolute noob here.  I'm trying to figure out how to set up a Java program in eclipse to call jasperreport from within the program.  

Here is example code that I want to run:

More specifically, what do I download/set as the classpath in order to perform the following library imports:

import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;

yus0359's picture
Joined: Feb 21 2018 - 11:41am
Last seen: 4 years 2 months ago

2 Answers:

reportdev's picture
Joined: Oct 12 2015 - 12:05pm
Last seen: 1 month 3 weeks ago

Following page list the required jar file to build and execute Java program using jasperreports library. You'll need at least "Commons" and "JRXML" libraries. If you're using a database, you'll also need jdbc library. The other libraries depends on which format you're going to export your report to. Charts is required if you're using chart elements.

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 3 years 2 months ago