Writing a Java event handler
Writing a Java event handler that uses the iHub API is similar to writing other types of event handlers. You create a Java event handler class, make the class available to BIRT, and associate the class with a report element. The difference is the additional JAR files required to access the iHub API.
You must add the following JAR files in the build path and classpath when configuring the Java event handler project:
$ACTUATE_HOME\iHub2\Jar\BIRT\lib\scriptapi.jar
This JAR file provides the event handler classes and access to the reportContext object. If you use the ULocale methods, com.ibm.icu_version.jar is also required. $ACTUATE_HOME is the location where iHub is installed.
$ACTUATE_HOME\iHub2\reportengines\lib\jrem.jar
This JAR file contains the definitions of the classes and methods in the iHub API.
Figure 21‑2 shows the build path of a Java project that uses the iHub API. In this example, Actuate BIRT Designer is installed on the same machine where iHub is installed. If Actuate BIRT Designer is installed on a different machine, you must copy the JAR files from the iHub machine to your workspace.
Figure 21‑2 Build path of a Java project that uses the iHub API