How to upgrade the version of Java used by AutoPilot

Periodically you may need to update java.   In many cases, this is transparent to AutoPilot Domain, CEP and web services.   However, if you encounter problems, this FAQ helps with some of the steps required. 

We recommend that Java is installed by your server administrators.  This allows regular maintenance to be applied and is generally transparent to AutoPilot as we certify versions well in advance of most customers installing them.   In these cases, we will get the java location from the system.  

On Windows systems, we offer the option to install a java environment as part of installation but again recommending using one installed on the system if present. 

When starting services, if you encounter an error related to Java such as Error code 2, or java not found, you may need to make changes to the path so that it can located.  You can explicitly specify the location in the lax file (ATPNODE.lax).  For example 

lax.nl.current.vm=C:\\Program Files\\Java\\jre1.8.0_161\\bin\\java.exe

The apache tomcat server sets the location for java during installation.  You can modify this script to change the explicit location to using a variable (such as JAVA_HOME) to simplify changing java versions.  On Unix/Linux, you need to edit Catalina.sh and change or comment out the line that says 

JAVA_HOME=/your/java/path

for windows, you need to set JAVA_HOME and then delete and reinstall the service as described in the installation guide