- JasperReports 3.5 for Java Developers
- David R. Heffelfinger
- 921字
- 2021-04-01 13:58:22
Downloading JasperReports
JasperReports is distributed as a JAR file that needs to be added to the CLASSPATH of any application we wish to add reporting capabilities to. JasperReports can be downloaded from http://jasperforge.org/plugins/project/project_home.php?group_id=102.

Clicking on the Download link around the center of the page will take us to the JasperReports download page on SourceForge.net.

The specific version on your screen might be different; at the time of writing, the latest stable version of JasperReports is 3.5.2.
It is not always clear what exactly is downloaded by clicking on these links; thus, we will provide a brief explanation of what each link is for.
- jasperreports-3.5.2-applet.jar: This first download link is for a JAR file containing a subset of the JasperReports functionality. Specifically, it contains classes that can be used to display JasperPrint files, which are reports in JasperReports' native format. This file is offered as a separate download as a convenience for developers; it can be used for applications or applets that don't need full reporting capabilities, yet need to display generated reports. Even though the filename has a suffix of "applet", there is nothing preventing us from using it with standalone applications, without the overhead that the missing JasperReports classes would add to the download. This file is approximately 346 KB in size.
- jasperreports-3.5.2.jar: This is the second download link, and it is the complete JasperReports class library. It contains all classes necessary to compile, fill, and export reports, but does not include any additional libraries that JasperReports depends on. This is the minimum file requirement for us to add full reporting capabilities to our Java applications. However, if we choose to download this file, we need to download the JasperReports dependencies separately. This file is approximately 2.2 MB in size.
- jasperreports-3.5.2-javaflow.jar: This is the third download link, and it is the javaflow version of JasperReports. This version of JasperReports should be used in environments where multithreading is discouraged. This file is approximately 2.2 MB in size.
- jasperreports-3.5.2-project.tar.gz: This is the fourth download link, and it contains the complete JasperReports class library plus all the required and optional libraries. In addition, it contains the entire file as a gzipped TAR file, which is common in Unix and Unix-like systems, such as Linux. This download also includes the JasperReports source code and a lot of source code providing examples of JasperReports' functionality. This gzipped TAR file is approximately 42 MB in size
- jasperreports-3.5.2-project.zip: The fifth download link, like the fourth link, contains the complete JasperReports class library plus all the required and optional libraries, along with the JasperReports source code. However, it contains the files in ZIP format, which is more commonly used under Microsoft Windows. This file is approximately 51 MB in size.
Tip
Unless Internet connection speed is an issue, we recommend downloading one of the last two mentioned files, as they include everything we need to create reports with JasperReports. Another good reason to download one of these files is that the included examples are a great way to learn how to implement the different JasperReports features. All of the examples in the file come with an ANT build file containing targets to compile and execute them.
We will refer to this file as the JasperReports project file, or more succinctly, as the project file.
Once we have downloaded the appropriate file for our purposes, we need to set up our environment to be able to start creating reports. In the next section, we discuss how to do this, assuming that the project file was downloaded.
Setting up our environment
To set up our environment to get ready for creating reports, we need to extract the JasperReports project ZIP file to a location of our choice. Once we extract the project ZIP file, we should see a jasperreports-3.5.2
directory (The actual name of the directory may vary slightly depending on the version of JasperReports.) containing the following files and directories:
build
: This directory contains the compiled JasperReports class files.build.xml
: This is an ANT build file, which builds the JasperReports source code. If we don't intend to modify JasperReports, we don't need to use this file as JasperReports is distributed in compiled form.changes.txt
: This file explains the differences between the current and previous versions of the JasperReports' class library.demo
: This directory contains various examples demonstrating several aspects of JasperReports functionality.dist
: This directory contains a JAR file containing the standard, javaflow, and applet versions of the JasperReports library. We should add one of these JAR files to our CLASSPATH to take advantage of JasperReports functionality.docs
: This directory contains a quick reference guide to most XML tags used in JasperReports templates.lib
: This directory contains all the libraries needed to build JasperReports and to use it in our applications.license.txt
: This file contains the full text of the LGPL license.pom.xml
: This is a Maven 2 POM file used to build JasperReports with Maven, just likebuild.xml
. We don't need this file because JasperReports is distributed in compiled form.readme.txt
: This file contains instructions on how to build and execute the supplied examples.src
: This directory contains the JasperReports source code.Tip
Getting up and running quickly
To get up and run quickly, the files to add to the CLASSPATH are the JasperReports JAR files, and all the JAR files under the
lib
directory in the project ZIP file. By adding these files to the CLASSPATH, we don't have to worry about the CLASSPATH when implementing additional functionality, for example, when exporting to PDF or producing charts.
- Adobe創(chuàng)意大學(xué)After Effects CS5 產(chǎn)品專(zhuān)家認(rèn)證標(biāo)準(zhǔn)教材
- ModelSim電子系統(tǒng)分析及仿真(第3版)
- JBoss AS 5 Development
- Illustrator實(shí)例教程:Illustrator 2021(電子活頁(yè)微課版)
- Python 2.6 Graphics Cookbook
- Protel DXP 2004 SP2原理圖與PCB設(shè)計(jì)(第4版)
- 中文版SolidWorks 2015技術(shù)大全
- 中文版 Photoshop CC 從入門(mén)到精通
- Illustrator CC 2018中文版入門(mén)與提高
- COSPLAY的后期藝術(shù):Lightroom+Photoshop修圖技法攻略
- Photoshop CC UI設(shè)計(jì)標(biāo)準(zhǔn)培訓(xùn)教程
- AutoCAD入門(mén)教程全掌握
- 新編中文版3ds Max 2016入門(mén)與提高
- WordPress MU 2.8: Beginner's Guide
- iOS智能手機(jī)APP界面設(shè)計(jì)實(shí)戰(zhàn)教程