- 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.
- 中文版AutoCAD 2016從入門到精通
- 從零開始:Flash CS6中文版基礎培訓教程
- 畫筆圣經 Photoshop專業繪畫技法
- ABAQUS基礎入門與案例精通
- Tomcat 6 Developer's Guide
- 深入理解OpenCV:實用計算機視覺項目解析(原書第3版)
- Oracle Warehouse Builder 11g: Getting Started
- CorelDRAW X6核心應用案例教程(全彩慕課版)
- ASP.NET Core 3從入門到實戰
- 中文版Photoshop CS5實用教程(第2版)
- Premiere Pro CC 2015中文版基礎與實例教程(第4版)
- Flash CS6 動畫制作實戰從入門到精通
- Sage ACT! 2011 Dashboard and Report Cookbook
- 邊做邊學:After Effects CS6影視后期合成案例教程(微課版)
- 從零開始利用Excel與Python進行數據分析