Run Java Applet

Java Applets can be created using the Host Access Class Library (HACL) Java by using a set of Java objects that allows application programmers to access host applications easily and quickly.

For information on creating a HACL Java Applet, see Host Access Class Library for Java.

Steps to Run a Java applet:

  1. Click Actions from the Session-window Menu-bar to see the 'Actions' pull-down menu.
  2. Choose Run Java Applet... from the menu to launch the Run Java Applet dialog-box.
  3. Enter the name of the class that you want to run (with or without an extension).

    To load and run successfully, the class must implement the ECLAppletInterface function and have a default constructor. For Personal Communications to find the class, the class file must be stored in the application data directory given while installing Personal Communications.

    Refer to the Host Access Class Library Reference documents for more information on how to compile your source file into a class file using the Personal Communications Host Access Class Library Java classes.

  4. Select JAVA_HOME if you want to use an alternate JRE (Java Virtual Machine Runtime Environment). (Note: This option is not available if the JAVA_HOME Windows environment variable is not set on the local machine.)

    By default, the IBM version of JRE 1.8 is installed with Personal Communications on most Windows systems. You may choose to use a different JRE by using the custom JAVA_HOME environment variable. The variable should contain the full path to the top JRE folder that contains the bin and lib subfolders.

    If the JAVA_HOME variable has been set, the value is shown in the JAVA_HOME text area and the checkbox is active in the Run Applet dialog. You may then check the box in order to run the ECLAppletInterface-based Java applet with the alternate JRE.

  5. Select 'with Java console' option if you want to run the applet with an active Java console.
  6. Click Run to start the applet.

For configuring a Java Applet to Autostart, see Configuring a Java Applet to Autostart.