Santi CaltabianoApache ANT (ant.apache.org)JasperReports comes bundled with some custom ANT targets for previewing report designs and forviewing reports serialized in JasperReports native format. Although not mandatory, it is veryhelpful to have ANT available to take advantage of these custom targets. Throughout this book, wewill be using JasperReports-specific ANT targets. Therefore, ANT is required when following theexamples. ANT can be downloaded from http://ant.apache.org/.ANTLR (www.antlr.org)What is ANTLR? ANTLR, ANother Tool for Language Recognition, is a language tool thatprovides a framework for constructing recognizers, interpreters, compilers, and translatorsfrom grammatical descriptions containing actions in a variety of target languages. ANTLRprovides excellent support for tree construction, tree walking, translation, error recovery,and error reporting. There are currently about 5,000 ANTLR source downloads a month.barbecue (http://barbecue.sourceforge.net)Barbecue is an open-source, Java library that provides the means to createbarcodes for printing and display in Java applications. A number of barcodeformats are supported and many more can be added via the flexible barcodeAPI. Barcodes can be output to three different image formats (PNG, GIF,JPEG), used as a Swing component, or written out as SVG.batik (http://xmlgraphics.apache.org/batik)Batik is a Java-based toolkit for applications or applets that want to use imagesin the Scalable Vector Graphics (SVG) format for various purposes, such asdisplay, generation or manipulation. The project’s ambition is to givedevelopers a set of core modules that can be used together or individually tosupport specific SVG solutions. Examples of modules are the SVG Parser, theSVG Generator and the SVG DOM. Another ambition for the Batik project is tomake it highly extensible—for example, Batik allows the developer to handlecustom SVG elements. Even though the goal of the project is to provide a setof core modules, one of the deliverables is a full fledged SVG browserimplementation which validates the various modules and their inter-operability.Apache BCEL (http://jakarta.apache.org/bcel)The Byte Code Engineering Library is intended to give users a convenientpossibility to analyze, create, and manipulate (binary) Java class files (thoseending with .class). Classes are represented by objects which contain all the
Santi CaltabianoJava evaluation features: Evaluate full Java source classes dynamically as well as isolated Java methods, statements, and expressions.Scripting features: Optionally typed variables. Scripted methods with optionally typed arguments and return values Scripted objects (method closures) Scripted interfaces and event handlers. Convenience syntax for working with JavaBean properties, hashtables, and primitive wrapper types. Auto-allocation of variables to emulate Java properties files. Extensible set of utility and shell-like commands Dynamic classpath management including find grained class reloading Dynamic command loading and user command path Sophisticated namespace and callstack management Detailed error reportingBeanShell Uses Interactive Java - try out object features, APIs and GUI widgets - "hands on". Scripting extension for applications - Allow your applications to be extended via scripts in an intuitive and simple way. Macro Languages - Generate scripts as macros and execute them live in your VM easily. Education - Teach Java in a hands-on, live environment Expression evaluator for scientific, financial apps and rules engines - evaluate complex expressions with conditions and loops. Remote debugging - Embed a live, remotely accessible shell / command line in your application with just a few lines of code. Use BeanShell declaratively to replace properties files and replace startup config files with real scripts that perform complex initialization and setup with the full Java syntax at their disposal.Apache Commons beanutils (http://commons.apache.org/beanutils)Most Java developers are used to creating Java classes that conform to theJavaBeans naming patterns for property getters and setters. It is natural tothen access these methods directly, using calls to the corresponding getXxxand setXxx methods. However, there are some occasions where dynamicaccess to Java object properties (without compiled-in knowledge of theproperty getter and setter methods to be called) is needed. Example usecases include: Building scripting languages that interact with the Java object model (such as the Bean Scripting Framework).
Santi Caltabiano Building template language processors for web presentation and similar uses (such as JSP or Velocity). Building custom tag libraries for JSP and XSP environments (such as Jakarta Taglibs, Struts, Cocoon). Consuming XML-based configuration resources (such as Ant build scripts, web application deployment descriptors, Tomcats server.xml file).The Java language provides Reflection and Introspection APIs (see thejava.lang.reflect and java.beans packages in the JDK Javadocs).However, these APIs can be quite complex to understand and utilize. TheBeanUtils component provides easy-to-use wrappers around thesecapabilities.Since the 1.7.0 release BeanUtils has distributed three jars: commons-beanutils.jar - contains everything commons-beanutils-core.jar - excludes Bean Collections classes commons-beanutils-bean-collections.jar - only Bean Collections classesThe main commons-beanutils.jar has an optional dependency on CommonsCollectionsApache Commons Collections (http://commons.apache.org/collections/)The Java Collections Framework was a major addition in JDK 1.2. It addedmany powerful data structures that accelerate development of mostsignificant Java applications. Since that time it has become the recognisedstandard for collection handling in Java.Commons-Collections seek to build upon the JDK classes by providing newinterfaces, implementations and utilities. There are many features, including: Bag interface for collections that have a number of copies of each object Buffer interface for collections that have a well defined removal order, like FIFOs BidiMap interface for maps that can be looked up from value to key as well and key to value MapIterator interface to provide simple and quick iteration over maps Type checking decorators to ensure that only instances of a certain type can be added Transforming decorators that alter each object as it is added to the collection Composite collections that make multiple collections look like one Ordered maps and sets that retain the order elements are added in, including an LRU based map Identity map that compares objects based on their identity (==) instead of the equals method
Santi Caltabiano Reference map that allows keys and/or values to be garbage collected under close control Many comparator implementations Many iterator implementations Adapter classes from array and enumerations to collections Utilities to test or create typical set-theory properties of collections such as union, intersection, and closureApache Commons digester (http://commons.apache.org/digester)Many projects read XML configuration files to provide initialization of variousJava objects within the system. There are several ways of doing this, and theDigester component was designed to provide a common implementation thatcan be used in many different projects.Basically, the Digester package lets you configure an XML -> Java objectmapping module, which triggers certain actions called rules whenever aparticular pattern of nested XML elements is recognized. A rich set ofpredefined rules is available for your use, or you can also create your own.Advanced features of Digester include: Ability to plug in your own pattern matching engine, if the standard one is not sufficient for your requirements. Optional namespace-aware processing, so that you can define rules that are relevant only to a particular XML namespace. Encapsulation of Rules into RuleSets that can be easily and conveniently reused in more than one application that requires the same type of processing.Apache Common javaflow(http://commons.apache.org/sandbox/javaflow)Sometimes it is usefull if we can capture the state of the application, its stackof function calls, which includes local variables, the global variables and theprogram counter, and save them into an object. If this object would give usthe ability to restart the processing from the point stored in it.A continuation is exactly the type of object that we need. Think of acontinuation as an object that, for a given point in your program, contains asnapshot of the stack trace, including all the local variables, and the programcounter. You can not only store these things in the continuation object, butalso restore the execution of the program from a continuation object. Thismeans that the stack trace and the program counter of the running programbecome the ones stored in a continuation.Continuations are powerful concepts from the world of functional languages,like Scheme, but they are becoming popular in other languages as well.
Santi CaltabianoApache Commons logging (http://commons.apache.org/logging)When writing a library it is very useful to log information. However there aremany logging implementations out there, and a library cannot impose the useof a particular one on the overall application that the library is a part of.The Logging package is an ultra-thin bridge between different loggingimplementations. A library that uses the commons-logging API can be usedwith any logging implementation at runtime. Commons-logging comes withsupport for a number of popular logging implementations, and writingadapters for others is a reasonably simple task.Applications (rather than libraries) may also choose to use commons-logging.While logging-implementation independence is not as important forapplications as it is for libraries, using commons-logging does allow theapplication to change to a different logging implementation withoutrecompiling code.Note that commons-logging does not attempt to initialise or terminate theunderlying logging implementation that is used at runtime; that is theresponsibility of the application. However many popular loggingimplementations do automatically initialise themselves; in this case anapplication may be able to avoid containing any code that is specific to thelogging implementation used.groovy (http://groovy.codehaus.org)What’s groovy? is an agile and dynamic language for the Java Virtual Machine builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk makes modern programming features available to Java developers with almost-zero learning curve supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications simplifies testing by supporting unit testing and mocking out-of-the-box seamlessly integrates with all existing Java objects and libraries compiles straight to Java bytecode so you can use it anywhere you can use Java
Santi Caltabianohibernate (https://www.hibernate.org)Hibernate is a powerful, high performance object/relational persistence and query service.Hibernate lets you develop persistent classes following object-oriented idiom - includingassociation, inheritance, polymorphism, composition, and collections. Hibernate allows youto express queries in its own portable SQL extension (HQL), as well as in native SQL, orwith an object-oriented Criteria and Example API.Unlike many other persistence solutions, Hibernate does not hide the power of SQL fromyou and guarantees that your investment in relational technology and knowledge is asvalid as always. The LGPL open source license allows the use of Hibernate andNHibernate in open source and commercial projects.Hibernate is a Professional Open Source project and a critical component of the JBossEnterprise Middleware System (JEMS) suite of products. JBoss, a division of Red Hat,offers a range of 24x7 Professional Support, Consulting, and Training services to assistyou with Hibernate.HyperSQL (abbrev. HSQLDB) (http://hsqldb.org)Version 2.0 supports the widest range of SQL Standard features seen in any open source databaseengine. We have reached SQL Standard conformance to almost full SQL-1992 Advanced Level andSQL:2008 core language features and support an extensive list of SQL:2008 optional features plusmany extensions. The engine is fully multithreaded and supports 2PL and MVCC transactioncontrol models. See the list of new features in version 2.0. Please test this version and report anyissues you find. Download available from the file download page. A more recent snapshot jar withthe latest bug fixes is available from the support page.iText PDF (http://itextpdf.com)iText is a library that allows you to generate PDF files on the fly.iText is an ideal library for developers looking to enhance web- and other applications withdynamic PDF document generation and/or manipulation. iText is not an end-user tool.Typically you wont use it on your Desktop as you would use Acrobat or any other PDFapplication. Rather, youll build iText into your own applications so that you can automatethe PDF creation and manipulation process. For instance in one or more of the followingsituations: Due to time or size, the PDF documents cant be produced manually. The content of the document must be calculated or based on user input. The content needs to be customized or personalized. The PDF content needs to be served in a web environment. Documents are to be created in "batch process" mode.You can use iText to: Serve PDF to a browser Generate dynamic documents from XML files or databases
Santi CaltabianoJCommon is licensed under the terms of the GNU Lesser General Public Licence (LGPL) version2.1 or later.Note that JCommon is being maintained but not actively developed and in the future will bedropped as a dependency for both JFreeChart and Pentaho Reporting.JDT Compiler (http://www.eclipse.org/jdt/core/index.php)JDT stands for Java Development Tools. The JDT compiler is the Java compiler included with theEclipse IDE (Integrated Development Environment). The JDT compiler is needed only when theJasperReports application is running under a Java Runtime Environment (JRE), and not under a fullJDK.When compiling reports, JasperReports creates temporary Java files and compiles them. Whenusing a JDK, JasperReports takes advantage of tools.jar for this functionality. Since a JREdoes not include tools.jar, the JDT compiler is needed. The JasperReports project ZIP fileversion 1.2.2 includes the JDT compiler. It can be found under the lib subdirectory of thedirectory created when extracting the project ZIP file. The file to be added to your CLASSPATH isjdt-compiler.jar.This file cannot be downloaded separately. Therefore, if we need to execute our code under a JRE,we need to download the JasperReports project ZIP file, since it includes the file, which is neededfor report compilation.JasperReports requires either tools.jar or the JDT when compiling JRXML templates intobinary JasperReports templates. A JRE is sufficient if our Java application does not compile reports.jfreechart (http://www.jfree.org/jfreechart)JFreeChart is a free 100% Java chart library that makes it easy for developers to displayprofessional quality charts in their applications. JFreeCharts extensive feature set includes: a consistent and well-documented API, supporting a wide range of chart types; a flexible design that is easy to extend, and targets both server-side and client-side applications; support for many output types, including Swing components, image files (including PNG and JPEG), and vector graphics file formats (including PDF, EPS and SVG); JFreeChart is "open source" or, more specifically, free software. It is distributed under the terms of the GNU Lesser General Public Licence (LGPL), which permits use in proprietary applications.For a closer look at JFreeChart, please try our JFreeChart Demo (web start) or browse the Samplespage.
Santi CaltabianoJava Persistence API (JPA)(http://java.sun.com/javaee/technologies/persistence.jsp)The Java Persistence API provides a POJO persistence model for object-relational mapping. TheJava Persistence API was developed by the EJB 3.0 software expert group as part of JSR 220, butits use is not limited to EJB software components. It can also be used directly by web applicationsand application clients, and even outside the Java EE platform, for example, in Java SEapplications. See JSR 220.Java Excel API (abbrev. jexcelapi) (http://jexcelapi.sourceforge.net)Java Excel API is a mature, open source java API enabling developers to read,write, and modifiy Excel spreadsheets dynamically. Now java developers canread Excel spreadsheets, modify them with a convenient and simple API, andwrite the changes to any output stream (e.g. disk, HTTP, database, or anysocket).Any operating system which can run a Java virtual machine (i.e., not justWindows) can both process and deliver Excel spreadsheets. Because it is Java,the API can be invoked from within a servlet, thus giving access to Excelspreadsheets over internet and intranet web applications.Some Features Reads data from Excel 95, 97, 2000, XP, and 2003 workbooks Reads and writes formulas (Excel 97 and later only) Generates spreadsheets in Excel 2000 format Supports font, number and date formatting Supports shading, bordering, and coloring of cells Modifies existing worksheets Is internationalized, enabling processing in almost any locale, country,language, or character encoding (formulas are currently only supported inEnglish, French, Spanish, and German, but more can be added if translated) Supports copying of charts Supports insertion and copying of images into spreadsheets Supports logging with Jakarta Commons Logging, log4j, JDK 1.4 Logger, etc ...and much moreApache log4j (http://logging.apache.org/log4j)Log4j è un framework che permette di utilizzare il meccanismo dei log allinterno diun’applicazione in modo semplice, potente ed elegante. Il log è un’informazione che può essereutilizzata per effettuare un’analisi in caso di errore, per il ripristino di situazioni precedenti, perverificare se alcune operazioni sono state eseguite e da chi o cosa, o più in generale, per riassumerequanto accaduto in un determinato arco temporale. Log4j è divenuto il più popolare sistema dilogging tra gli sviluppatori Java (è disponibile anche per C, C++, C#, Perl, Python, …) ed ècompatibile a partire dalla JDK 1.1.x.È distribuito sotto licenza della Apache Fundation ed ècompletamente open source. L’ultima versione, comprensiva di codice sorgente e documentazione,è reperibile all’indirizzo http://jakarta.apache.org/log4j.
Santi Caltabianomondrian (http://sourceforge.net/projects/mondrian)Mondrian is an OLAP (online analytical processing) engine written in Java. It reads fromJDBC data sources, aggregates data in a memory cache, and implements the MDXlanguage and the olap4j and XML/A APIs.pngencoder (http://catcode.com/pngencoder)The PngEncoder class takes a Java Image as its input and produces a byte array in PNG format.This array can be saved in a file or sent to a client by a servlet.Apache POI (http://poi.apache.org) The Apache POI Projects mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsofts OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate. OLE2 files include most Microsoft Office files such as XLS, DOC, and PPT as well as MFC serialization API based file formats. The project provides APIs for the OLE2 Filesystem (POIFS) and OLE2 Document Properties (HPSF). Office OpenXML Format is the new standards based XML file format found in Microsoft Office 2007 and 2008. This includes XLSX, DOCX and PPTX. The project provides a low level API to support the Open Packaging Conventions using openxml4j. For each MS Office application there exists a component module that attempts to provide a common high level Java api to both OLE2 and OOXML document formats. This is most developed for Excel workbooks (SS=HSSF+XSSF). Work is progressing for Word documents (HWPF+XWPF) and PowerPoint presentations (HSLF+XSLF). The project has recently added support for Outlook (HSMF). Microsoft opened the specifications to this format in October 2007. We would welcome contributions. There are also projects for Visio (HDGF) and Publisher (HPBF). As a general policy we collaborate as much as possible with other projects to provide this functionality. Examples include: Cocoon for which there are serializers for HSSF; Open Office.org with whom we collaborate in documenting the XLS format; and Lucene for which we provide format interpretors. When practical, we donate components directly to those projects for POI-enabling them.
Santi CaltabianoXerces2 is a fully conforming XML Schema processor. For more information, refer to theXML Schema page.Xerces2 also provides a complete implementation of the Document Object Model Level 3Core and Load/Save W3C Recommendations and provides a complete implementation ofthe XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASISXML Catalogs v1.1.Xerces2 is able to parse documents written according to the XML 1.1 Recommendation,except that it does not yet provide an option to enable normalization checking as describedin section 2.13 of this specification. It also handles namespaces according to the XMLNamespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if theDOM level 3 load/save APIs are in use.Apache xml api (http://xml.apache.org/xalan-j/downloads.html)Xalan-J has two processors, an interpretive one, Xalan Interpretive, and a compiled one,Xalan Compiled (XSLTC). Your choice of which binary distribution to download dependson which of the processors you want to use. There are 2 binary distributions available; youonly need to choose one of them. Both binary distributions contain xml-apis.jar andxercesImpl.jar from Xerces-Java 2.9.0. The first binary distribution, xalan-j_2_7_1-bin.zip or xalan-j_2_7_1- bin.tar.gz, contains the Xalan Interpretive processor, the Xalan Compiled processor (XSLTC) and the runtime support packages in a single jar, called xalan.jar. The reason to use this distribution would be that you dont know which processor you are going to use, or might be using both. The second binary distribution, xalan-j_2_7_1-bin-2jars.zip or xalan- j_2_7_1-bin-2jars.tar.gz contains the Xalan Interpretive processor in xalan.jar, and the Xalan Compiled processor (XSLTC) and the runtime support packages in xsltc.jar. The reason to using this distribution is that you want more control. If you are using just XSLTC you can put xsltc.jar on the classpath and not xalan.jar. If you are using just the interpretive processor you can put xalan xalan.jar on the classpath and not xsltc.jar. Of course you can put both xalan.jar and xsltc.jar from this distribution on your classpath if you want to use both.