This section describes how to build a Java applet that uses the Screen Customizer Component Interface (SCCI). Also described in this section are the requirements for preparing and compiling the source code.
Programs that use SCCI classes must import the appropriate SCCI packages to obtain class definitions and other compile-time information. The SCCI packages can be imported into a Java source file using the following statements:
import com.ibm.eNetwork.beans.HOD.*; // Hod classes and interfaces import com.ibm.eNetwork.HOD.*; // Hod classes and interfaces import com.ibm.hi.customizer.beans.scci.*; // Base SCCI classes import com.ibm.hi.customizer.beans.*; // Bean
To import the Custom listener interfaces and event classes (only needed when using Custom events):
import com.ibm.hi.customizer.beans.event.*; // Custom Events & Listeners
The SCCI jar (Java Archive) files are scbeans.jar and scbeanssnlv.jar. You may also need HOD classes habeans.jar and habeansnlv.jar. The SCCI and HOD jar files are located in the C:\Program Files\IBM\Host Access Toolkit\toolkit\jars directory, where C:\Program Files\IBM\Host Access Toolkit is the default directory chosen at installation time.
You will also need the HOD classes from either habeans.jar or habeansnlv.jar.
File Name | Description |
habeans.jar | Base Bean classes |
habeansnlv.jar | Base Bean classes as well as all national language support files |
scbeans.jar | Screen Customizer Bean and SCCI classes |
scbeansnlv.jar | Screen Customizer Beans and all national language _support files_ |
To successfully compile and run your application, the CLASSPATH environment variable must be updated to include the jar files needed by your application. You can also set the classpath using the Java compiler's '-classpath' parameter when compiling your application.
To find the SCCI and HACL classes in the jar files, the CLASSPATH variable (or -classpath parameter) must point directly to the jar files. For example, if the jar files are located in the c:\jars directory, the CLASSPATH should look like this (do not forget to include the base java classes, assume they are in c:\jdk\lib\classes.zip):
CLASSPATH=.;c:\jdk\lib\classes.zip;c:\jars\scbeans.jar;c:\jars\habeans.jar;
For example, assuming that the JDK is installed in the c:\jdk directory, Host On Demand is installed in c:\hostondemand, the necessary ScreenCustomizer and HOD jar files are in the default locations at c:\IBM\Host Access Toolkit\toolkit\, and HelloWorld is saved as c:\hostondemand\hod\HelloWorld.java, one of the following sets of commands needs to be executed:
c:\hostondemand\hod>set CLASSPATH=.;c:\jdk\lib\classes.zip;c:\IBM\Host Access Toolkit\toolkit\jars\debug\scbeans.jar; c:\IBM\Host Access Toolkit\toolkit\jars\debug\habeans.jar; c:\hostondemand\hod>c:\jdk\bin\javac HelloWorld.java
or:
c:\hostondemand\hod>c:\jdk\bin\javac -classpath .;c:\jdk\lib\classes.zip;c:\IBM\Host Access Toolkit\toolkit\jars\debug\scbeans.jar; c:\IBM\Host Access Toolkit\toolkit\habeans.jar; HelloWorld.java
Screen Customizer provides the ability to load and run user-defined applets. A user applet can be launched from the 'Run Applet' dialog or as a 'Startup Applet'. The 'Run Applet' dialog can be displayed from either the button bar or the 'Assist' pull-down menu. The dialog prompts for the name of a user-defined class (without the .class extension), constructs an instance of the class using the default constructor, and gives the class access to the current session. The 'Startup Applet' can be specified in the session configuration window on the Advanced tab. In the Screen Customizer Studio you can also invoke the run applet command as part of a macro on a button, or with Get-to-the-Point.
[ Top of Page | Previous Page| Next Page | Table of Contents]