Deploying Java libraries or classes

During macro playback, when the macro runtime processes a call to a Java™ method, the macro runtime searches all the available Java library files and class files for the class to which the method belongs. The search does not stop until it finds the class.

Deploying a Java library or class consists of placing the library file or class file containing the class in a location where the macro runtime can find it during macro playback. The following Java classes are automatically available for use and do not need to be deployed by you:

  • Classes in the Java API. The Java archive files are already present in the HCL ZIETrans application and their locations are listed in the classpath that is specified when the HCL ZIETrans application is launched.
  • Classes in the Host On-Demand Macro Utility Libraries. The HML libraries are stored with the HCL ZIETrans code (see The Macro Utility Libraries (HML libraries)).

All other Java classes containing methods invoked by a macro script must be deployed by you to a location where the macro runtime can find them. Depending on the environment, you can deploy the Java classes as class files or as libraries containing Java classes.

When using Java classes in a WebSphere® Application Server runtime environment (not portal), be aware that the macro runtime is packaged in a Java EE Enterprise Application (.ear) file. If the Java classes are packaged in an HCL ZIETrans Web project, you must update the Web archive (WAR) class loader policy to Single class loader for application to ensure that the macro runtime can access them when the macro runs. If this configuration is not done, ClassNotFoundExceptions will occur when the macro invokes the Java classes. To learn how to configure the class loader policy, see Configuring application class loaders in the documentation for the version of WebSphere Application Server that you are using .