IBM Books

Host Access Class Library for Java


Building Host Access Class Library Applets

This section describes how to build a Java applet which uses the Host Access Class Library (ECL). The source code preparation and compiling requirements are described.

Source Code Preparation

Programs that use ECL classes must import the ECL package to obtain class definitions and other compile-time information. The ECL package can be imported into a Java source file using the following statement:

import com.ibm.eNetwork.ECL.*;

Compiling

To compile the new Java source file, the CLASSPATH must be updated to include the directory containing the ECL package. If the ECL was installed in a Windows environment, the CLASSPATH should already be updated. If the ECL was not installed in a Windows environment, the user will have to either update the CLASSPATH environment variable manually or use the '-classpath' parameter of the Java compiler, javac, to specify the location of the ECL.

Executing

When an applet that uses the ECL is executed, the ECL package must be found relative to the HTML document from which it was run or relative to the 'codebase' tag in the 'applet' tag. When an application that uses the ECL is executed, the directory containing the ECL package must be found in the CLASSPATH environment variable.


[ Top of Page | Previous Page | Next Page | Table of Contents ]