JasperReports is an open source Java library designed to aid developers with the task of adding reporting capabilities to Java applications. It is not a standalone tool and therefore it cannot be installed on its own. Instead, it is embedded into Java applications by including its library in the application's CLASSPATH. Being a Java library, JasperReports is not meant for end users. Rather, it is targeted towards Java developers who need to add reporting capabilities to their applications.
JasperReports is licensed under the Lesser GNU Public Library (LGPL). This license was chosen for JasperReports because, unlike the GPL, it allows JasperReports to be used in both open source and closed source applications. Applications linking to the JasperReports Java class library do not need to be open source. However, if you are considering making modifications to the existing JasperReports source code, then your modifications will have to be released under the LGPL. Refer to http://www.gnu.org/copyleft/lesser.html for the complete license.
Although JasperReports is primarily used to add reporting capabilities to web-based applications using the servlet API, it has absolutely no dependencies on the servlet API or any other Java EE library. It is, therefore, by no means limited to web applications. There is nothing that stops us from creating standalone desktop or command-line Java applications to generate reports with JasperReports. After all, JasperReports is nothing but a Java class library providing an API to facilitate the ability to generate reports from any kind of Java application.
JasperReports requires a Java Development Kit (JDK) 1.4 or newer in order to successfully compile applications incorporating the JasperReports Java class library and a Java Runtime Environment (JRE) 1.3 or newer to successfully execute these applications. The older versions of JasperReports required a JDK to successfully execute JasperReports applications (strictly speaking, JasperReports requires tools.jar
to be in the CLASSPATH, and tools.jar
is included in the JDK, not JRE). As of version 0.6.4, however, JasperReports is bundled with the Eclipse
Java Development Tools (JDT) compiler and no longer needs a JDK to execute deployed applications. Examples in this book were developed using JDK 1.6 but should compile and execute successfully with any JDK or JRE supported by JasperReports.