Overview
This article will guide those administrators who are using the UniFi Network Controller on a Debian/Ubuntu server and want to use Oracle Java instead of the default OpenJDK. It will also explain when UniFi needs to be re-configured.
Configuration Steps
If Oracle Java is installed with a method different than the one described in the Debian documentation linked above, you will need to configure UniFi to work properly. This configuration should be persistent across upgrades of the UniFi Network Controller so will only need to be done once.
To do this, define the JAVA_HOME location on your Debian/Ubuntu server and input this command:
echo "JAVA_HOME=/usr/lib/jvm/java-8-oracle" | sudo tee -a /etc/default/unifi