Publishing Engine Programmer's Guide > The Arbortext Publishing Engine Sub-Process > Implementing Arbortext PE Applications > Installing an Arbortext PE Application
  
Installing an Arbortext PE Application
Place your custom Arbortext PE Application in the appropriate PE_HOME\custom directory to make it accessible to Arbortext PE sub-processes (refer to Overview of Custom Programs and Scripts for information). A Java application must be either a set of class files or a Java Archive (JAR file) containing class files. You would place the .class or .jar files in custom\classes. ACL, JavaScript, and VBScript applications (.acl, .js, and .vbs files) would be placed in custom\init.
If you use the same install tree to run Arbortext Editor and Arbortext Publishing Engine, the presence of ACL, JavaScript, and VBScript applications in custom\init can prevent Arbortext Editor from loading without error. These applications may be relying on the presence of scripts that are available to Arbortext PE sub-processes and Arbortext Publishing Engine Interactive but not to Arbortext Editor.
As a workaround, you can place your ACL, JavaScript, and VBScript applications in PE_HOME\custom\scripts, and place a companion ACL script that loads the application files in PE_HOME\custom\init. The ACL script specifies the condition to run only under an Arbortext PE sub-process or Arbortext Publishing Engine Interactive.
For example, you can use the ACL predefined variables, $is_e3 and $is_e3_interactive, to determine the mode in which Arbortext Publishing Engine is running.
$is_e3 determines if the Arbortext Publishing Engine is running in server-mode (no user interface). If true, it returns any value other than zero.
$is_e3_interactive determines if the Arbortext Publishing Engine is running in Arbortext Publishing Engine Interactive mode (running the user interface). If true, it returns any value other than zero.
The following example illustrates how to use these variables in an ACL script:
if (main::is_e3) {
# I’m running in PE server mode.
}
else if (main::is_e3_interactive) {
# I’m running in PE Interactive.
}
else {
# I’m running in Editor.
}