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 https://www.ibm.com/docs/en/personal-communications/15.0?topic=library-host-access-class-java.
Steps to Run a Java applet:
- Click Actions from the Session-window Menu-bar to see the 'Actions' pull-down menu.
- Choose Run Java Applet... from the menu to launch the Run Java Applet dialog-box.
- 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.
- Personal Communications no longer packages its own JRE. Instead, it uses the system-installed
JRE/JDK defined by the
JAVA_HOMEWindows environment variable.- Ensure that the
JAVA_HOMEvariable is set to the full path of the JRE/JDK installation directory (the folder containing thebinandlibsubfolders). - If
JAVA_HOMEis not set, the option to use an alternate Java Runtime Environment will not be available. - When
JAVA_HOMEis configured, its value is displayed in the Run Applet dialog, and the checkbox becomes active. You can then select it to run the ECLAppletInterface-based Java applet with the specified JRE/JDK.
- Ensure that the
- Select 'with Java console' option if you want to run the applet with an active Java console.
- Click Run to start the applet.
Note: From version 13.0.5.0 onwards, IBM JRE is not bundled with Personal Communications. Hence, it is mandatory to set the JAVA_HOME environment variable with the Java path. By default, the “Run Java Applet” feature uses the JRE set in “JAVA_HOME” environment variable.
For configuring a Java Applet to Autostart, see Configuring a Java Applet to Autostart.